I have a postgres database on Vercel. I use a SvelteKit app to connect to that database locally.
I wanted to create a replica of the database to use for testing. I used pg_dump
and pqsql
to replicate the data from the existing database to the new one. I did get some errors but the data was copied across.
Now, I can’t connect to either database anymore.
I get the following error:
SSL is enabled for both Postgres (e.g. ?sslmode=true in the connection string) and the WebSocket tunnel (useSecureWebSocket = true). Double encryption will increase latency and CPU usage. Please disable SSL on the Postgres connection.
/Users/brendangibson/dev/fabric/node_modules/@neondatabase/serverless/index.js:2
`);it.write(Hi.format.apply(Hi,e))}}Object.defineProperty(Ee.exports,"isWin",{get:function(){return Ct},set:function(r){Ct=r}});Ee.exports.warnTo=function(r){var e=it;return it=r,e};Ee.exports.getFileName=function(r){var e=r||y.env,t=e.PGPASSFILE||(Ct?Qi.join(e.APPDATA||"./","postgresql","pgpass.conf"):Qi.join(e.HOME||"./",".pgpass"));return t};Ee.exports.usePgPass=function(r,e){return Object.prototype.hasOwnProperty.call(y.env,"PGPASSWORD")?!1:Ct?!0:(e=e||"<unkn>",Tu(r.mode)?r.mode&(Cu|Uu)?(vr('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less',e),!1):!0:(vr('WARNING: password file "%s" is not a plain file',e),!1))};var Pu=Ee.exports.match=function(r,e){return qe.slice(0,-1).reduce(function(t,n,i){return i==1&&Number(r[n]||_u)===Number(e[n])?t&&!0:t&&(e[n]==="*"||e[n]===r[n])},!0)};Ee.exports.getPassword=function(r,e,t){var n,i=e.pipe(Au());function s(u){var h=Ru(u);h&&Mu(h)&&Pu(r,h)&&(n=h[Bu],i.end())}var o=function(){e.destroy(),t(n)},a=function(u){e.destroy(),vr("WARNING: error on reading file: %s",u),t(void 0)};e.on("error",a),i.on("data",s).on("end",o).on("error",a)};var Ru=Ee.exports.parseLine=function(r){if(r.length<11||r.match(/^\s+#/))return null;for(var e="",t="",n=0,i=0,s=0,o={},a=!1,u=function(c,f,w){var g=r.substring(f,w);Object.hasOwnProperty.call(y.env,"PGPASS_NO_DEESCAPE")||(g=g.replace(/\\([:\\])/g,"$1")),o[qe[c]]=g},h=0;h<r.length-1;h+=1){if(e=r.charAt(h+1),t=r.charAt(h),a=n==xr-1,a){u(n,i);break}h>=0&&e==":"&&t!=="\\"&&(u(n,i,h+1),i=h+2,n+=1)}return o=Object.keys(o).length===xr?o:null,o},Mu=Ee.exports.isValidEntry=function(r){for(var e={0:function(o){return o.length>0},1:function(o){return o==="*"?!0:(o=Number(o),isFinite(o)&&o>0&&o<9007199254740992&&Math.floor(o)===o)},2:function(o){return o.length>0},3:function(o){return o.length>0},4:function(o){return o.length>0}},t=0;t<qe.length;t+=1){var n=e[t],i=r[qe[t]]||"",s=n(i);if(!s)return!1}return!0}});var $i=U((El,Er)=>{"use strict";d();var vl=(pr(),K(dr)),Ki=(wr(),K(yr)),Ut=ji();Er.exports=function(r,e){var t=Ut.getFileName();Ki.stat(t,function(n,i){if(n||!Ut.usePgPass(i,t))return e(void 0);var
...
if(r===3)this.dataView.setUint8(n,(s&16711680)>>16),this.dataView.setUint16(n+1,s&65535);else if(r===4)this.dataView.setUint32(n,s);else throw new Error(`Invalid length for length field: ${r}`);this.indent-=1,this.indents[this.offset]=this.indent}}writeLengthUint8(r){return this._writeLengthGeneric(1,!1,r)}writeLengthUint16(r){return this._writeLengthGeneric(2,!1,r)}writeLengthUint24(r){return this._writeLengthGeneric(3,!1,r)}writeLengthUint32(r){return this._writeLengthGeneric(4,!1,r)}writeLengthUint8Incl(r){return this._writeLengthGeneric(1,!0,r)}writeLengthUint16Incl(r){return this._writeLengthGeneric(2,!0,r)}writeLengthUint24Incl(r){return this._writeLengthGeneric(3,!0,r)}writeLengthUint32Incl(r){return this._writeLengthGeneric(4,!0,r)}array(){return this.data.subarray(0,this.offset)}commentedString(r=!1){let e=this.indents[0]!==void 0?Rr.repeat(this.indents[0]):"",t=this.indents[0]??0,n=r?this.data.length:this.offset;for(let i=0;i<n;i++){e+=this.data[i].toString(16).padStart(2,"0")+" ";let s=this.comments[i+1];this.indents[i+1]!==void 0&&(t=this.indents[i+1]),s&&(e+=` ${s}
Error: Pre data did not match expectation
at gs (/Users/brendangibson/dev/fabric/node_modules/@neondatabase/serverless/index.js:2:26304)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async V.startTls (/Users/brendangibson/dev/fabric/node_modules/@neondatabase/serverless/index.js:43:3390)
Node.js v20.14.0
Deployment URL or Custom Domain: localhost:5173
Environment (local, preview, production): local
Project Framework: SvelteKit
Build Settings:
Framework Preset:
Build Command (if not default):
Output Directory (if not default):
Install Command (if not default):
Node/Runtime Version: 20
Package Manager:
Relevant Packages: