Skip to content

with_lock causing lots of errors andperform_token_refresh! should use atomic save #2075

@netwire88

Description

@netwire88

Issue summary

In Mongoid 9.0, when .refresh_token_if_expired! is called, error is raised "undefined method with_lock' for an instance of Shop (NoMethodError)". with_lock` seems to be a method in ActiveRecord but Mongoid doesn't implement ActiveRecord.

Before opening this issue, I have:

  • [ x] Upgraded to the latest version of the package
    • shopify_app version: 23.0
    • Ruby version: 3.3.6
    • Operating system:
  • [ x] Set log_level: :debug in my configuration, if applicable
  • [ x] Found a reliable way to reproduce the problem that indicates it's a problem with the package
  • [x ] Looked for similar issues in this repository
  • [x ] Checked that this isn't an issue with a Shopify API

Expected behavior

No error raised

What do you think should happen?

Actual behavior

What actually happens?

Steps to reproduce the problem

Debug logs

// Paste any relevant logs here

Metadata

Metadata

Assignees

No one assigned

    Labels

    devtools-gardenerPost the issue or PR to Slack for the gardener

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions