question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accounts will not sync for new installs

See original GitHub issue

Describe the bug When trying to sync a new database using the env variable’s for API keys the sync returns “no results found”

To Reproduce

  1. Hook up dj-stripe to a new DJango app (no existing DB)
  2. Run the migrationsm then run djstripe_sync_models
  3. Observe that nothing syncs
  • This may be because I have multiple stripe accounts under my login, though the keys should be different so maybe not.

Expected behavior Database data should sync between string and dj-stripe.

Environment

  • dj-stripe version: 2.4.1
  • Your Stripe account’s default API version: 2019-12-03
  • Database: Postgres 10
  • Python version: 3.7
  • Django version: 3.0.2

Can you reproduce the issue with the latest version of master? I have not tried.

I am pretty sure I found the issue, though I am not sure of the implications of the change I made in order to get the sync to work. In September, the Account sync block was moved inside the for loop, which prevents it from running no matter what I do to set things up differently (https://github.com/dj-stripe/dj-stripe/blob/ee72ca54b7c1c9e982170ab114c739d48661e54a/djstripe/management/commands/djstripe_sync_models.py#L74)

This is the change in question: https://github.com/dj-stripe/dj-stripe/commit/39acfcbfa356a8744458703dd71e8cc77194fe3d

Once I moved the line 64-75 block back to where it was, outside the for loop, the sync worked correctly and everything was fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shamjamcommented, Jul 13, 2022

Hi @arnav13081994, sorry for the late reply.

I tried it out on the latest version (2.7.0b1), and I now see the warning in red on the console 😃

1reaction
arnav13081994commented, Jun 16, 2022

@shamjam in the pre-release and all future versions you need to have API keys in the DB. The sync command should have outputted a warning on the console as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix account sync issues - Android Help - Google Support
If your phone is having problems syncing with your Google Account, you could see a message, "Sync is currently experiencing problems.
Read more >
Resolve sync issues in Mail and Calendar apps in Windows 10
Go to Start and open Mail. Select Manage Accounts. Select the account your want to remove, and select Delete account from this device....
Read more >
12 Ways to Fix Google Drive Not Syncing on Windows 10 ...
To do so, find the system tray, click on the sync icon and select “Quit Backup and Sync” option. To start it, click...
Read more >
How to run an advanced reinstall of Dropbox
Learn what to do if you need to run an advanced reinstall of the Dropbox desktop app on your Windows, Mac, or Linux...
Read more >
Samsung account will not sync on phone or tablet
Your Samsung account may not be syncing if you aren't connected to the internet or if your Samsung Cloud settings need to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found