Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to setup the repo locally #56

Open
Vaib215 opened this issue Jun 29, 2024 · 2 comments
Open

Unable to setup the repo locally #56

Vaib215 opened this issue Jun 29, 2024 · 2 comments

Comments

@Vaib215
Copy link

Vaib215 commented Jun 29, 2024

I cloned the repo locally & followed the instructions. After setting up the .dev.vars file, I got this issue on running it in browser:

✘ [ERROR] DOMException {

    code: 5,
    name: 'InvalidCharacterError',
    message: "atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)",
    stack: "InvalidCharacterError: atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)\n" +
      '    at unsign (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/cloudflare/dist/crypto.js:29:42)\n' +
      '    at async decodeCookieValue (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/cookies.js:88:27)\n' +
      '    at async Object.parse (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/cookies.js:60:60)\n' +
      '    at async getSession (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js:32:45)\n' +
      '    at async getUsername (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/app/utils/getUsername.server.ts:31:18)\n' +
      '    at async loader (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/app/root.tsx:36:20)\n' +
      '    at async callRouteLoader (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/data.js:62:16)\n' +
      '    at null.<anonymous> (async file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/.wrangler/tmp/dev-eqryWK/index.js:3128:19)\n' +
      '    at async callLoaderOrAction (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:4832:16)\n' +
      '    at async Promise.all (index 0)'
  }

[wrangler:inf] GET / 500 Internal Server Error (36ms)

I want to play around with cloudflare calls. Is there a way to resolve this problem?

@Vaib215
Copy link
Author

Vaib215 commented Jun 29, 2024

I managed to run the code by replacing atob with decode from cloudflare's base64url utilities package but then i got this error once i enter my display name

✘ [ERROR] SyntaxError: Invalid character /

      at parse (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/rfc4648/lib/rfc4648.js:48:13)
      at Object.parse (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/rfc4648/lib/rfc4648.js:167:12)
      at decode (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@cfworker/base64url/dist/decode.js:3:47)
      at unsign (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/cloudflare/dist/crypto.js:30:42)
      at async decodeCookieValue (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/cookies.js:88:27)
      at async Object.parse (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/cookies.js:60:60)
      at async getSession (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js:32:45)
      at async getUsername (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/app/utils/getUsername.server.ts:31:18)
      at async loader (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/app/root.tsx:36:20)
      at async callRouteLoader (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/data.js:62:16)

@Vaib215
Copy link
Author

Vaib215 commented Jun 29, 2024

Also this one sometimes

[wrangler:inf] GET /build/routes/_index-ZF727FQZ.js 200 OK (8ms)

✘ [ERROR] Error: Invariant failed

      at invariant (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/tiny-invariant/dist/esm/tiny-invariant.js:12:11)
      at loader7 (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/app/routes/_index.tsx:16:2)
      at async callRouteLoader (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/server-runtime/dist/esm/data.js:62:16)
      at null.<anonymous> (async file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/.wrangler/tmp/dev-VvfP1x/index.js:3128:19)
      at async callLoaderOrAction (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:4832:16)
      at async Promise.all (index 1)
      at async callDataStrategyImpl (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:4673:17)
      at async callDataStrategy (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:3928:19)
      at async loadRouteData (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:3872:19)
      at async queryImpl (file:///Users/vaib/Documents/codes/webdev/the-abc-live/orange/node_modules/@remix-run/router/router.ts:3631:20)

[wrangler:inf] GET / 500 Internal Server Error (24ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant