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

"[mf:err] GET /: InvalidCharacterError: Invalid character" - npx superflare@latest new #47

Open
tsteckenborn opened this issue Apr 30, 2023 · 3 comments

Comments

@tsteckenborn
Copy link

Running npx superflare@latest new -> Database Models, Scheduled Tasks-> npm install --legacy-peer-deps-> npx superflare migrate -> npm run dev or npx superflare dev yields the following error on opening the index URL right now:

[mf:err] GET /: InvalidCharacterError: Invalid character
    at atob (.../node_modules/@miniflare/core/src/standards/encoding.ts:33:13)
    at unsign (.../node_modules/@remix-run/cloudflare/dist/crypto.js:29:42)
    at decodeCookieValue (.../node_modules/@remix-run/server-runtime/dist/cookies.js:82:27)
    at Object.parse (.../node_modules/@remix-run/server-runtime/dist/cookies.js:54:60)
    at Object.getSession (.../node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js:36:54)
    at handleFetch2 (.../node_modules/@superflare/remix/dist/index.mjs:23:5)
    at ServiceWorkerGlobalScope.[kDispatchFetch] (.../node_modules/@miniflare/core/src/standards/event.ts:385:13)
    at Server.<anonymous> (.../node_modules/@miniflare/http-server/src/index.ts:291:20)
@subhendukundu
Copy link

I am facing the same issue, not able to get it to load.

@jplhomer
Copy link
Owner

jplhomer commented Apr 30, 2023

🤔 I've seen this sometimes too, and it's usually when the APP_KEY is not set properly in .dev.vars.

Can you confirm you have that value set? It's definitely not a super valuable error message coming from Remix/Miniflare.

@tsteckenborn
Copy link
Author

tsteckenborn commented May 1, 2023

The APP_KEY is defined in the .dev.vars, yet that must have happened through npx superflare@latest new. Yet without the worker itself being pushed by that, I don't exactly know how I could check against the eventual corresponding secret it should be according to https://superflare.dev/deploying#checklist. npx wrangler secret list -jdoesn't work for me, as it seems to be still looking for the toml (Required Worker name missing. Please specify the Worker name in wrangler.toml, or pass it as an argument with --name <worker-name>), npx wrangler secret list --name my-app-name errors with workers.api.error.script_not_found [code: 10007].

Right now I'd assume that the secret therefor isn't set. Yet I'm confused as the only reference to APP_KEY is in the deployment docs.

It might make sense to add the additional steps necessary to:

## Installation
The easiest way to start with Superflare is to spin up a brand-new project with the following command:
```bash
npx superflare@latest new
```
Superflare will ask you which bindings you'd like to use for D1, R2 and KV. It will also offer to create the bindings if you haven't already!
Once you get your project created, you can start a local development server with:
```bash
npx superflare dev
```
## Remix + Superflare

and

outro(
`You're all set! \`cd ${path}\`, run \`npm install --legacy-peer-deps\`, and then \`npx superflare migrate\` to get started.`
);
}

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

3 participants