Skip to content
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

Receive error when enabling Shopify sync #3502

Closed
brent-hoover opened this issue Jan 18, 2018 · 5 comments · Fixed by #3645
Closed

Receive error when enabling Shopify sync #3502

brent-hoover opened this issue Jan 18, 2018 · 5 comments · Fixed by #3645
Assignees
Labels
bug For issues that describe a defect or regression in the released software

Comments

@brent-hoover
Copy link
Collaborator

Expected behavior

No error

Actual behavior

Received a "Error setting up shopify sync" when clicking on "Setup Sync" button

Steps to reproduce the behavior

  1. Add Stripe credentials in connector
  2. Enable "Update Inventory when new Shopify order is placed"
  3. Click on Setup Sync
  4. Observe error (no error in server console)

Versions

Node: 8.9.1
NPM: 5.5.1
Meteor Node: 8.9.3
Meteor NPM: 5.5.1
Reaction CLI: 0.24.2
Reaction: 1.6.4
Reaction branch: master
Docker: 17.12.0-ce
@brent-hoover brent-hoover added bug For issues that describe a defect or regression in the released software impact-major labels Jan 18, 2018
@Akarshit Akarshit self-assigned this Jan 18, 2018
@Akarshit
Copy link
Contributor

The cause of this is that here we get the current domain and send that to Shopify as the inbound address.
But when running locally, the address is localhost:3000. Address with domain localhost are not allowed by Shopify and we get address not valid error.
@zenweasel suggested it would be best to take the URL as a configuration parameter,
@spencern What do you think?

@spencern
Copy link
Contributor

The best solution here is to use a tunnelling tool such as ngrok.
https://ngrok.com/
This makes it trivial to expose your localhost:3000 to the internet with a domain that you can put in the Shopify settings.

@brent-hoover
Copy link
Collaborator Author

I think the point would be that it's a common use case to have the server that would receive webhooks be different from the one that you would be running the admin on. For example almost everywhere I have worked things like the admin tool are run within a VPC whereas things which need to be exposed to the internet are run in a different cluster with different addressing. Or if you use a service like RunScope (an API proxy). The key being that there are a lot of different configurations here and I think we should allow for them. If we are worried that people won't know what that is (hopefully not if they are configuring webhooks?) we could prepopulate that field with the current domain?

That's why I think this should be a user-specified option rather than just grabbing the URL of the server you happen to be on at the moment.

@Akarshit Akarshit removed their assignment Jan 24, 2018
@Akarshit Akarshit self-assigned this Feb 8, 2018
@Akarshit
Copy link
Contributor

Akarshit commented Feb 9, 2018

@zenweasel Just found another reason that this was not working. The topic being passed to the Shopify API is incorrect.
It was working for me because I was testing on branch of a old master(before the code responsible was introduced.)
Working to fix it.

@Akarshit
Copy link
Contributor

Both the reason for this issue were fixed in the PR.

This was referenced Feb 15, 2018
@spencern spencern mentioned this issue Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants