Giter Site home page Giter Site logo

nextjs-shopify-app-no-custom-server's People

Contributors

redochka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nextjs-shopify-app-no-custom-server's Issues

Error while trying to pull products

On a local env, it runs into trouble when it tries to fetch products. It appears that it's not able to get an online session

event - compiled client and server successfully in 438 ms (1421 modules)
error - (api)/pages/api/products.js (10:53) @ __WEBPACK_DEFAULT_EXPORT__
TypeError: Cannot read properties of undefined (reading 'shop')
   8 | 
   9 |   const session = await Shopify.Utils.loadCurrentSession(req, res);
> 10 |   const client = new Shopify.Clients.Graphql(session.shop, session.accessToken);

Initial install redirect not working on mobile

The redirects work great on desktop, but on mobile it tries to take you to the app instead of the install page, which results in a "page not found" error on Shopify.

I can’t figure out what the issue is that it doesn’t want to redirect properly on mobile. Any ideas?

just to clarify, this is the redirect that happens when clicking "add app" from the listing page.

Product Page Session Error

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 case products.
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.