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

"missing app token" when building with --remote #10617

Closed
1 task
coding-in-public opened this issue Mar 30, 2024 · 3 comments
Closed
1 task

"missing app token" when building with --remote #10617

coding-in-public opened this issue Mar 30, 2024 · 3 comments
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) pkg: db

Comments

@coding-in-public
Copy link

Astro Info

Astro                    v4.5.1
Node                     v20.11.1
System                   macOS (arm64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             astro:db
                         @astrojs/db/file-url

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I am logged into Astro Studio, linked, and able to work with production data using the --remote flag in dev mode. When attempting to build with the --remote flag, I get the following error (was not happening with astro db 0.8.8, but does happen in 0.9.0):

Cannot create a remote client: missing app token.
Stack trace:
at createRemoteDatabaseClient (file:///Users/chris.pennington/cip/astro-course-files/astro-course-files/node_modules/@astrojs/db/dist/runtime/db-client.js:32:11)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async generatePage (file:///Users/chris.pennington/cip/astro-course-files/astro-course-files/node_modules/astro/dist/core/build/generate.js:204:22)
at async staticBuild (file:///Users/chris.pennington/cip/astro-course-files/astro-course-files/node_modules/astro/dist/core/build/static-build.js:96:7)
at async AstroBuilder.run (file:///Users/chris.pennington/cip/astro-course-files/astro-course-files/node_modules/astro/dist/core/build/index.js:165:7)

What's the expected result?

astro build --remote

should build using the remote data if I’m logged in and linked to an Astro studio project.

(the minimal repo can't really be linked to Astro studio, but short of logging in and linking, everything else is the same as my local files)

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-6icpvd

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Mar 30, 2024
@casungo
Copy link

casungo commented Mar 30, 2024

I'm experiencing the exact same issue.

In an attempt to resolve the problem, I tried:

  • Deleting the .astro folder
  • Reinstalling @astrojs/db
  • Reinstalling all packages
  • Checking the documentation to see if the code has changed (my usage of astrodb is very basic, so the code I use is essentially the same as in the docs)

However, none of these actions resolved the issue.
In the @astrojs/db changelog, the change Remove embedded app token from CI is mentioned, and I have a suspicion that this is the culprit modification causing the problem. (Pure speculation)

Astro info

Astro                    v4.5.12
Node                     v20.7.0
System                   Windows (x64)
Package Manager          pnpm
Output                   hybrid
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/sitemap
                         @astrojs/svelte
                         astro:db
                         @astrojs/db/file-url

@matthewp matthewp self-assigned this Apr 2, 2024
@matthewp matthewp added pkg: db - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) and removed needs triage Issue needs to be triaged - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) labels Apr 2, 2024
@matthewp
Copy link
Contributor

matthewp commented Apr 2, 2024

Fixed by #10655

@rocky8818
Copy link

Fixed by #10655

In which astro version is the fix? Im trying in Astro 4.9.2 and astrojs/db 0.11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) pkg: db
Projects
None yet
Development

No branches or pull requests

4 participants