Code Monkey home page Code Monkey logo

Comments (9)

drum7 avatar drum7 commented on May 24, 2024

I have this exact same issue both running as a normal npm app and as a container.

from send.

okyanusoz avatar okyanusoz commented on May 24, 2024

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' },

from send.

okyanusoz avatar okyanusoz commented on May 24, 2024

It worked for me

from send.

drum7 avatar drum7 commented on May 24, 2024

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...

from send.

okyanusoz avatar okyanusoz commented on May 24, 2024

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.

from send.

drum7 avatar drum7 commented on May 24, 2024

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.

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!

from send.

okyanusoz avatar okyanusoz commented on May 24, 2024

I looked at the network activity and saw the 401 error

from send.

cmerola avatar cmerola commented on May 24, 2024

Thanks @okyanusoz! Excited to try it out.

from send.

ioistired avatar ioistired commented on May 24, 2024

I tried setting the environment variable FXA_REQUIRED to false (which is the format convict expects for boolean env vars) and it didn't help.

from send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.