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

realm_dart-3.4.0/lib/src/handles/native/init.dart:155:12: Error: Method not found: 'DBRef'. #1778

Closed
Bilonik opened this issue Aug 13, 2024 · 7 comments · Fixed by #1779
Closed

Comments

@Bilonik
Copy link

Bilonik commented Aug 13, 2024

What happened?

Cant run Realm 3.4.0

I think is missing the new ejson package.

Repro steps

  1. Download the new Release 3.4.0 and run.

Version

3.24

What Atlas Services are you using?

Atlas Device Sync

What type of application is this?

Flutter Application

Client OS and version

iOS 17

Code snippets

No response

Stacktrace of the exception/crash you're getting

Launching lib/main.dart on iPad Pro 13-inch (M4) in debug mode...
Running Xcode build...                                                  
Xcode build done.                                           17.2s
Failed to build iOS app
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/realm_dart-3.4.0/lib/src/handles/native/init.dart:155:12: Error: Method not found: 'DBRef'.


Could not build the application for the simulator.
Error launching application on iPad Pro 13-inch (M4).

Relevant log output

No response

Copy link

sync-by-unito bot commented Aug 13, 2024

➤ PM Bot commented:

Jira ticket: RDART-1089

@Bilonik
Copy link
Author

Bilonik commented Aug 13, 2024

Workaround:

dependency_overrides:
ejson:
git:
url: https://github.com/realm/realm-dart
ref: main
path: packages/ejson

@mniyaz
Copy link

mniyaz commented Aug 14, 2024

Workaround:

dependency_overrides: ejson: git: url: https://github.com/realm/realm-dart ref: main path: packages/ejson

can you help how to do this. I dont understand

@SPodjasek
Copy link

@mniyaz just put lines shown above to your pubspec.yaml:

dependency_overrides:
  ejson:
    git:
      url: https://github.com/realm/realm-dart
      ref: main
      path: packages/ejson

and run flutter pub get afterwards.

@nielsenko
Copy link
Contributor

@mniyaz You need to update your pubspec.yaml with the suggested dependecy_override

dependency_overrides:
  ejson:
    git:
      url: https://github.com/realm/realm-dart
      ref: main
      path: packages/ejson

Alternatively you can pin realm to 3.3.0 until this mess is sorted out.

The reason this is happening is that realm 3.4.0 was released without ejson 0.4.0 being released. The ejson packages are still pre 1.0, and one of the things still outstanding is that the github action workflow for publishing (publish-release.yml) doesn't include them yet.

@TimotejKovac
Copy link

Just pining realm to 3.3.0 using

dependencies:
  realm: '3.3.0'

is insufficient. I also had to do

dependency_overrides:
  realm_common: '3.3.0'
  realm_dart: '3.3.0'
  realm_generator: '3.3.0'

otherwise these were resolved to their latest versions (3.4.0) in pubspec.lock. Not sure if this is required but still leaving it here if someone will have the same issue.

@nielsenko
Copy link
Contributor

This will be fixed shortly in 3.4.1.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants