You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you have any idea what could be the problem? I changed the Redis loglevel to "Debug" and it does affirm one key in the database. I used the CLI to retrieve it and it looks okay ( i guess)
I am both new to Shopify aswell as Redis. My other sample app just used the InMemory storage, but since your project depends on having Redis, I am bumping into this issue. If you have any idea what could be the issue here I would be very thankful
The text was updated successfully, but these errors were encountered:
Update: CASE CLOSED :D I just had to add the "false" boolean for "isOnline" in the Session provider. Now it retrieves the products and the page works fine.
I will need to read up on the Shopify.utils.loadCurrentSession and what "isOnline" means here.
Thanks for the baseplate! Once I am done cleaning up my fork, I will create a PR if you want.
Greetings,
I am currently modifying this on a fork. I got an error when trying to access your sample page.
nextjs-shopify-app-base-nextjs-1 | error - (api)/pages/api/products.js (10:53) @ WEBPACK_DEFAULT_EXPORT
TypeError: Cannot read properties of undefined (reading 'shop')
nextjs-shopify-app-base-nextjs-1 | 8 |
nextjs-shopify-app-base-nextjs-1 | 9 | const session = await Shopify.Utils.loadCurrentSession(req, res, true);
nextjs-shopify-app-base-nextjs-1 | > 10 | const client = new Shopify.Clients.Graphql(session.shop, session.accessToken);
nextjs-shopify-app-base-nextjs-1 | | ^
nextjs-shopify-app-base-nextjs-1 | 11 | // Use
client.get
to request the specified Shopify GraphQL API endpoint, in this caseproducts
.nextjs-shopify-app-base-nextjs-1 | 12 | const products = await client.query({
nextjs-shopify-app-base-nextjs-1 | 13 | data: `{
nextjs-shopify-app-base-nextjs-1 | wait - compiling /_error (client and server)...
Redis is working correctly (seemingly), and it says there is one key in the database after installation.
nextjs-shopify-app-base-nextjs-1 | token record from redis: {
nextjs-shopify-app-base-nextjs-1 | id: 'offline_REDACTED-development.myshopify.com',
nextjs-shopify-app-base-nextjs-1 | shop: 'REDACTED-development.myshopify.com',
nextjs-shopify-app-base-nextjs-1 | state: '628137656797721',
nextjs-shopify-app-base-nextjs-1 | isOnline: false,
nextjs-shopify-app-base-nextjs-1 | accessToken: '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',
nextjs-shopify-app-base-nextjs-1 | scope: 'write_products,write_customers,write_draft_orders,write_files'
nextjs-shopify-app-base-nextjs-1 | }
Do you have any idea what could be the problem? I changed the Redis loglevel to "Debug" and it does affirm one key in the database. I used the CLI to retrieve it and it looks okay ( i guess)
I am both new to Shopify aswell as Redis. My other sample app just used the InMemory storage, but since your project depends on having Redis, I am bumping into this issue. If you have any idea what could be the issue here I would be very thankful
The text was updated successfully, but these errors were encountered: