-
Notifications
You must be signed in to change notification settings - Fork 154
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
[Bug]: shopify app dev
stops authenticating development store preview
#3173
Comments
Hi @awd, I think the It sounds, though, like it happens at the same time that draft-pushing stops. Which means there's some kind of authentication issue (e.g. the token expired) and CLI requires a restart, but can't prompt you to reauthenticate mid- It would definitely help to run in |
Hey @amcaplan Thanks for replying so quickly on this one. I think crashing out might be useful here, because it does seem like the draft is no longer pushing. I've started running with Typically I'll run the command (first time for the day), and then it'll fail within a few minutes. Then I re-run the command, and it tends to work much longer. Not always the case, but seems like the first run after some time period of not running the command - causes it. Like there is an old token with a 5 min TTL or something cached in the tool. If I notice anything through |
Hi again @amcaplan Here's a snippet of verbose output when the red message appears.
Here's a few more request-ids: It basically continues to poll and the red message never clears, and pushing draft extension code silently stops. When I modify extension code, and the push is attempted this is the output:
Keep in mind this isn't always happening, but once it starts. I need to fully quit the process and rerun the original command. This tells me the token is not invalid (or should not be at least). |
@awd there's supposed to be a mechanism to refresh authentication in the background, which might be failing. Do you see in the verbose output anywhere: |
Hey @amcaplan Yep, the log output is below. Im experiencing this very frequently now, and have updated to the latest 3.53.0 release as well. --verbose:
Sometimes the CLI will report the auth has failed, and other times it's silent. Once I kill the process then I'll see the output that the auth has failed. Not sure how to reproduce this, seems like network conditions are at play? The only way I can resolve it is to quit the process entirely, and restart it. |
Thanks @awd! I'm surprised you're still seeing the issue on 3.53. With recent work, we should be detecting failure to refresh the token and completely erroring out. I can try digging into that request ID and figuring out what happened. |
@awd I haven't really found any answers yet. The CLI should refresh the token in the background, but there are certain circumstances where it fails to do so, such as if you've logged out in the browser. Is it possible that that's happening? |
Totally understand, It's definitely strange.. Im logged into the browser, in my dev store, in the partner dashboard, etc. All seems to be fine. The auth appears to fail a lot - my network is stable (Starlink), wonder why are the auth tokens so short lived? Seems like every 2-5 minutes they are expired. This is occurs specifically when working on theme extensions, where code changes are pushing to development store preview - draft themes. When a local code change occurs, this appears in the CLI console: Then when the auth has failed - nothing happens after saving a code change. Just trying to provide more info to see if something rings a bell. I appreciate the help here, it's one of those things that adds a few extra steps every couple of minutes, and confusing when silently failed as my code change isn't reflected in the draft theme editor. |
@awd I'm in the exact situation. I push changes for few minutes on my theme app extension and then suddenly it stops authenticating my changes and i have to kill the dev process and start it again. It's really frustrating as i also need to reconfigure the dev theme, linked to my theme app extension, every time i restart dev because it doesn't keep my configurations. |
Encountering a similar problem as described by the user @awd |
Hey folks, I recognize this took some time to figure out, but I have a repro, and this is definitely specific to theme app extensions. I have traced the root cause of the problem, made a potential fix, and am in the process of verifying. On another note, @scerelli I wanted to ask you about this:
Can you please elaborate more on what you mean when you say "it doesn't keep my configurations"? This sounds like useful feedback that we'd love to know more about. |
@amcaplan I'm experiencing a problem where my session token expires every ~10 minutes. This requires me to restart the development process, to get a new one. Meanwhile, I have set up various theme app extensions and configurations in the theme editor (from the link provided in the terminal). However, each time I restart the |
Just a quick ping, been a bit busy with Winter Edition (check it out if you haven't yet!) but I've also had some challenges getting the fix to work reliably. I want to fix this right, which may take a bit more time. Anyway, just didn't want you all thinking I'd forgotten you. |
Thanks @amcaplan ! |
Hey folks! By now the latest changes should be included in the nightly release of the CLI. So if you update your The updates will of course also be included in the 3.56.0 release. |
Please confirm that you have:
In which of these areas are you experiencing a problem?
App
Expected behavior
Running
shopify app dev
should be a simple task, but it fails frequently when using it in.Something is causing the draft previews to update, and the error below appears in red text.
Actual behavior
After some time, and usually quitting and re-running
shopify app dev
the error message does not appear.When this message appears it means draft versions of app extensions, checkout extensions, theme extensions fail to update as well. It's a huge pain because it means extra steps to continuing to work. It breaks the flow when suddenly the extension is not responding to code changes (did I introduce a bug?, did I break something?)
Verbose output
Failed to fetch the latest status of the development store preview, trying again in 5 seconds.
This error appears in RED text in the console.
The text was updated successfully, but these errors were encountered: