You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 22, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on May 22, 2021. It is now read-only.
Immediate upload failure (something went wrong page) #1513
I got this up and running fairly quickly from the docs and insight from https://ahmedmusaad.com/self-hosting-firefox-send/, however, when it comes to uploading documents, it instantly fails to the /error page as soon as I click upload - all other file stats display correctly. My hunch is that it's storage related, though tmk I thought it was suppose to default to local storage. All seems fine except for the upload portion.
This is what the web console shows: TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at Object.pruneTokens (storage.js:213) at new <anonymous> (storage.js:38) at Object.<anonymous> (storage.js:228) at o (bootstrap:63) at Module.<anonymous> (metrics.js:1) at o (bootstrap:63) at Module.<anonymous> (app.f2f95a8e.js:29) at o (bootstrap:63) at Object.<anonymous> (app.f2f95a8e.js:29) pruneTokens @ storage.js:223
Me too - How'd you find the fix? Someone else posted a new 401 error with that as an ENV variable. Couldn't find it in the docs, but I'm sure that's just b/c i'm skimming. It also makes sense since they're changing how the service can be used to mandate auth...
So, it checks if a FXA(Firefox Account) is required and if the client is not authenticated, it gives an error.
In the configuration, Firefox Accounts are required by default but you need a client ID for that and we don't have any.
That's why this happens.
With you - except where I saw the error in my console was...I think storage.js or something weird, leading me to think it was some undocumented storage req. I also could be remembering wrong so will have to play a bit later... You just tried to submit something and then watched the console?
Activity
drum7 commentedon Aug 19, 2020
I have this exact same issue both running as a normal npm app and as a container.
okyanusoz commentedon Aug 23, 2020
OK. I found a solution. Open server/config.js in any editor and change this line:
fxa_required: { format: Boolean, default: true, env: 'FXA_REQUIRED' },to:
fxa_required: { format: Boolean, default: false, env: 'FXA_REQUIRED' },okyanusoz commentedon Aug 23, 2020
It worked for me
drum7 commentedon Aug 23, 2020
Me too - How'd you find the fix? Someone else posted a new 401 error with that as an ENV variable. Couldn't find it in the docs, but I'm sure that's just b/c i'm skimming. It also makes sense since they're changing how the service can be used to mandate auth...
okyanusoz commentedon Aug 23, 2020
Well, let me explain, take a look at this code where the 401 error occurs:
if (config.fxa_required && !user) { ws.send( JSON.stringify({ error: 401 }) ); return ws.close(); }(taken from https://github.com/mozilla/send/blob/master/server/routes/ws.js)So, it checks if a FXA(Firefox Account) is required and if the client is not authenticated, it gives an error.
In the configuration, Firefox Accounts are required by default but you need a client ID for that and we don't have any.
That's why this happens.
drum7 commentedon Aug 23, 2020
With you - except where I saw the error in my console was...I think storage.js or something weird, leading me to think it was some undocumented storage req. I also could be remembering wrong so will have to play a bit later... You just tried to submit something and then watched the console?
In any event...thank you!
okyanusoz commentedon Aug 23, 2020
I looked at the network activity and saw the 401 error
cmerola commentedon Aug 28, 2020
Thanks @okyanusoz! Excited to try it out.
ioistired commentedon Sep 9, 2020
I tried setting the environment variable FXA_REQUIRED to
false(which is the formatconvictexpects for boolean env vars) and it didn't help.