Giter Club home page Giter Club logo

Comments (9)

Svarto avatar Svarto commented on June 11, 2024

Are you trying to instantiate the nhost-js-sdk in the nhost custom api container? Are you self hosting HBP (is that what you mean with docker)? And which version of nhost-js-sdk?

from nhost-js-sdk.

joshhopkins avatar joshhopkins commented on June 11, 2024

Are you trying to instantiate the nhost-js-sdk in the nhost custom api container?

I'm not familiar with the nhost custom api container, as in this container? I'm running this image.

Are you self hosting HBP (is that what you mean with docker)?

Yes, testing locally.

And which version of nhost-js-sdk?

Latest version of nhost-js-sdk – 2.3.4.

from nhost-js-sdk.

Svarto avatar Svarto commented on June 11, 2024

I ran into this problem recently and got it fixed by upgrading to v3.0.0 nhost-js-sdk AND HBP v.2.2.4. Try it and maybe it works for you too?

from nhost-js-sdk.

joshhopkins avatar joshhopkins commented on June 11, 2024

Thanks for the update @Svarto. I'm still getting the same response after updating to nhost-js-sdk v3.0.0 + HBP v.2.2.4 (tried both docker image and source).

It doesn't seem to be related to this library as "\"cookie\" is not allowed" is thrown when calling POST /auth/login.

I had a quick look here at it appears that there something odd going on with validation. See output:

[Error [ValidationError]: "cookie" is not allowed] {
  _original: { cookie: true },
  details: [
    {
      message: '"cookie" is not allowed',
      path: [Array],
      type: 'object.unknown',
      context: [Object]
    }
  ]
}

I also tried updating to the latest version of Joi (current package has been depreciated), with no luck.

from nhost-js-sdk.

nunopato avatar nunopato commented on June 11, 2024

@joshhopkins if you explicitly set useCookies: false (for v3 note it is camelCase) you still get that error?

const nhostClient = createClient({
  baseURL: 'https://backend-url.nhost.app',
  useCookies: false, //defaults to false
})

from nhost-js-sdk.

joshhopkins avatar joshhopkins commented on June 11, 2024

Yes @nunopato – but I'm quite sure it's related to this.

from nhost-js-sdk.

elitan avatar elitan commented on June 11, 2024

@joshhopkins Can you just double-check your HBP version? Do you self-host or use Nhost?

If you're self-hosting and using something like image:nhost/hasura-backend-plus:latest try to do docker-compose pull so you actually have the latest version.

I tried this exact setup and everything is working for me.

from nhost-js-sdk.

aaronhayes avatar aaronhayes commented on June 11, 2024

I can confirm upgrading my docker version from nhost/hasura-backend-plus:v2.2.1 to nhost/hasura-backend-plus:v2.2.4 fixed this exact issue.

from nhost-js-sdk.

elitan avatar elitan commented on June 11, 2024

I'll close this for now since upgrading seems to fix the issue.

from nhost-js-sdk.

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.