Closed vfonic closed 7 months ago
Everything was working fine on v3.57.1 when I was passing in the --config
option.
Then I noticed that, if I omit --config
option, the wrong app (config) was being used.
So I did --reset
and that messed everything up...
Please, would it be possible to do less magic and give more access to developers? Why is the default app/organization not stored somewhere visibly within the project? I can see only downsides of not having this publicly exposed to developers.
I just tried yarn shopify auth logout
, still getting the same error after logging back in...
EDIT: The same error when I try to create a new app.
│ Cannot read properties of null (reading 'appModuleVersions') │ ...
FYI new app got created. The error happens after the app is created.
Here's the output from: https://github.com/Shopify/cli/blob/cec308092260996c1e16cf99d5aa97794018c05a/packages/app/src/cli/utilities/developer-platform-client/partners-client.ts#L307-L320
console.log(JSON.stringify(result, null, 2));
{
"app": {
"activeAppVersion": null
}
}
I managed to bypass this issue with:
async activeAppVersion({ apiKey }) {
const variables = { apiKey };
const result = await this.request(ActiveAppVersionQuery, variables);
const version = result.app.activeAppVersion;
+ console.log(JSON.stringify(result, null, 2));
+
+ if (!version) return null
+
return {
...version,
appModuleVersions: version.appModuleVersions.map((mod) => {
return {
...mod,
config: mod.config ? JSON.parse(mod.config) : {},
};
}),
};
}
Having the same issue but somehow @vfonic's suggestion is also not fixing it for me. The error is gone but it keeps wiping my config file.
I am currently at:
"@shopify/app": "3.58.0",
"@shopify/cli": ""3.58.0"
Thanks to everyone for reporting this and providing details + investigations! This will help a lot in finding a resolution ASAP.
3.58.1 is out, and should solve this problem! I'm closing this issue, as I believe it's solved, but please do let us know if you continue to experience any trouble.
Please confirm that you have:
In which of these areas are you experiencing a problem?
App, Extension
Expected behavior
yarn shopify app dev --config=my-config --tunnel-url=https://example.com:443 --no-update
Should pick up the Partner / App config from
shopify.app.my-config.toml
Actual behavior
Verbose output
This was an error in 3.57.1. In 3.57.1 the app toml file would be pretty much completely "cleared". The only thing that remained was
client_id
. All the other, already existing settings, generated (download) by Shopify CLI, would be removed.In 3.58.0, the toml file was left intact with all the settings. However, I get the following error now:
Reproduction steps
shopify.app.toml
, but maybeshopify.app.my-config.toml
yarn run shopify app dev --reset
yarn shopify app dev --config=my-config --tunnel-url=https://example.com:443 --no-update
Operating System
macOS
Shopify CLI version (check your project's
package.json
if you're not sure)3.58.0
Shell
zsh
Node version (run
node -v
if you're not sure)v18 and v20
What language and version are you using in your application?
Ruby 3.2.2