Failed to load functions/auth & graphql since upgrade to 0.44

Hello redwood community,

I recently upgraded to v 0.44 and when running yarn rw dev, the console is showing these 4 failures:

The repo is here: GitHub - josemasar/redwood-costbase

I am using Redwood’s own dbAuth.

I believe is the issue is related to the new RWJS_API_URL because when I tried to login, I get the following error:

I would appreciate very much your help to resolve this!

Many thanks!!

Josema

Hi @josemasar let’s try to help resolve this.

From what version did you upgrade?

Did your toml use the filling config settings?

Hello @dthyresson,

thanks for offering help!

I was upgrading from v 0.39.3 to 0.44.

Adding apiGraphQLUrl = “${apiUrl}/graphql” in my toml file has resolved the errors shown in my first two images. You guided me very well on this! :slight_smile:

I have also included apiDbAuthUrl = “${apiUrl}/auth”, but the rw dbAuth is not working. It´s looking for the function in http://localhost:8910/undefined/auth. Any experience with this type of error?

The docs will need a change because they say the context for these 2 parameters is only for ‘production’.

Best regards,
José

Update: I upgraded to v0.45 hoping that this fix below will resolve this issue, but it did not. It is still looking for the function in http://localhost:8910/undefined/auth.

  • api server: Windows fix, ensure posix paths #4440 by @Tobbe

So, to keep developing, I downgraded my project to v0.39.4 and everything works as before including rw dbAuth.

I will make a comment in the issue #4424.

This is strange indeed…

Are you on Windows or Mac? Also, could you copy output from yarn rw info?

Unless you are doing something custom with your dbAuth function, you shouldn’t need to add additional config to redwood.toml as the defaults will work, i.e. apiDbAuthUrl = “${apiUrl}/auth” is the default.

http://localhost:8910/undefined/auth means it isn’t finding ${apiUrl}.

Confirming you did you change the apiUrl variable name, i.e. it should now be:

[web]
  apiUrl = "/.redwood/functions"

And the globals do look ok (correct?) per:

There haven’t been any related breaking changes or required code mods from 39 to 45. For reference:

Maybe it’s just something jammed up with node_modules. Definitely skip v0.44 (cause bugs) and aim for v0.45. Try the trouble shooting steps outlined here after upgrading to v0.45:

Upgrading to v0.47.0 has resolved the issue.

Thanks for your help!