Polaris Resource Picker

Solved
Highlighted
Tourist
4 1 0

Hi!
I'm starting to learn Shopify development with Node + React guide. And i'm stuck with resource picker. I found out in the Internet that it is a very popular problem. I found some topics on github with a discussion of this problem. But i did not find out a solution for this bug.
Link for this guide - https://developers.shopify.com/tutorials/build-a-shopify-app-with-node-and-react 
I followed all the steps in this guide, but smth went wrong. It does not open on click. State changes, but there is no result.
Can anyone help me?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
39 7 8

Hi @nalivaikovova can you tell me if there's any errors in your console? 

0 Likes
Highlighted
Tourist
4 1 0

No. There is no error in console. Clicking on button "Select products" changes components state to "open: true". Even if i predefined "open" attribute to "true" resourcepicker wouldn't have opened.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
39 7 8

Do you have your API KEY and SECRET set in your .env file?

0 Likes
Highlighted
Tourist
4 1 0

Yes, i have it there. I went further in the guide, making queries using graphql and everything works for me.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
39 7 8

Okay! I'm going to spend some time today trying to troubleshoot. I'll get back to you this afternoon.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
39 7 8

This is an accepted solution.

Hi @nalivaikovova it seems you've found a bug.

 

Can you do me a favour and try to auth your app again by going to https://YOUR_NGROK_URL.io/auth?shop=YOUR_TEST_SHOP.shopify.com

 

Let me know if this solves the issue. I think your shopOrigin is not being set in the session.


@nalivaikovova wrote:

Yes, i have it there. I went further in the guide, making queries using graphql and everything works for me.


 

1 Like
Highlighted
Tourist
4 1 0

This is an accepted solution.

Hi @katiedavis!
shopOrigin was in my session, but with your help I found a different solution. I just clicked on the link that ngrok generated (example: https://e484d2a4.ngrok.io/) instead of the full link that you attached in your comment. And after that resource picker opened! In general, I still did not understand what the reason was, but I am very glad that it worked.
Thanks you a lot!

0 Likes