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

Upgrade analyzer in realm_generator #1073

Closed
Rakshak1344 opened this issue Dec 19, 2022 · 10 comments · Fixed by #1072
Closed

Upgrade analyzer in realm_generator #1073

Rakshak1344 opened this issue Dec 19, 2022 · 10 comments · Fixed by #1072
Assignees

Comments

@Rakshak1344
Copy link

Rakshak1344 commented Dec 19, 2022

Description

Because no versions of freezed match >2.3.2 <3.0.0 and freezed 2.3.2 depends on analyzer ^5.2.0, freezed ^2.3.2 requires analyzer ^5.2.0.
And because realm >=0.8.0+rc depends on realm_generator 0.8.0+rc which depends on analyzer ^4.7.0, freezed ^2.3.2 is incompatible with realm >=0.8.0+rc.
So, because at depends on both realm ^0.8.0+rc and freezed ^2.3.2, version solving failed.
pub get failed (1; So, because at depends on both realm ^0.8.0+rc and freezed ^2.3.2, version solving failed.)
Process finished with exit code 1

How important is this improvement for you?

Would be a major improvement

@Rakshak1344
Copy link
Author

Hey @nielsenko, May I know when will be the fixed version will be released?

Here is what I tried to test, In pubspec.yml

realm_dart:
    git:
      url: https://github.com/realm/realm-dart.git
      ref: kn/update-analyzer

Pub get output failed to import:

Warning: pubspec.yaml has overrides from pubspec_overrides.yaml
Error on line 28, column 11: Invalid description in the "realm_dart" pubspec on the "realm_common" dependency: "./common" is a relative path, but this isn't a local pubspec.
   ╷
28 │     path: ./common
   │           ^^^^^^^^
   ╵
pub get failed (65;    ╵)
Process finished with exit code 65

May I know how to try it out.

@nielsenko
Copy link
Contributor

Yeah.. it is bit more complicated than simply taking a git reference on my branch, since we are using path references during day to day development. Also, the bigger issue is that the native library needs to match.

If you really want to try it out before next release, the best way is to pull the full repo from github, build it locally - including the native lib, and take a path dependency on the result.

People are going on vacation for the Christmas (actually I already did), so I'm not sure a release will happen this side of new year.

@Rakshak1344
Copy link
Author

I appreciate for responding midst of Christmas, I tried to pull the repo as mentioned. I'm facing sync issue.

I/flutter (10078): [INFO] Realm: Connected to endpoint '15.207.151.40:443' (from '192.XXX.X.XXX:39XXX')
I/flutter (10078): [INFO] Realm: Verifying server SSL certificate using 155 root certificates
I/flutter (10078): [INFO] Realm: Connection[1]: Received: ERROR "sync is not enabled for this app" (error_code=101, try_again=true, session_ident=0, error_action=Warning)
I/flutter (10078): [INFO] Realm: Connection[1]: Connection closed due to error reported by server: sync is not enabled for this app (101)
I/flutter (10078): [ERROR] Realm: SyncError message: sync is not enabled for this app Logs: https://realm.mongodb.com/groups/6358fb334005f60d3594038e/apps/6392bd9a73c51deb8011cdae/logs?co_id=63a45bc002615b2d9d73645a category: SyncErrorCategory.connection code: SyncConnectionErrorCode.otherError isFatal: false

error log throws 404

Things that I did setup:

  1. Created a realm app, enabled flexible sync, and linked data source.
  2. Since JWT token is generated by our Nodejs server, I have enabled Custom JWT Authentication, added key that was used to sign token in node server.
  3. Referred flutter.todo.flex example to configure AppServices, the appId, appUrl, baseUrl, dataSourceName

If I'm missing out something please guide me.

@ianpward
Copy link
Contributor

Hi - I don't see Custom JWT Authentication enabled for your app - which app is it? The app linked in the logs above does not have it enabled

@Rakshak1344
Copy link
Author

Yes I found what went wrong, I had the example app running parallel. The above log belongs to the example. My bad

@Rakshak1344
Copy link
Author

Yet there is an another issue here is the log:

E/flutter (29147): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'librealm_dart.so': dlopen failed: library "librealm_dart.so" not found
E/flutter (29147): #0      _openRealmLib (package:realm_dart/src/init.dart:81:3)
E/flutter (29147): #1      initRealm (package:realm_dart/src/init.dart:105:24)
E/flutter (29147): #2      new _RealmCore._ (package:realm_dart/src/native/realm_core.dart:72:17)
E/flutter (29147): #3      new _RealmCore (package:realm_dart/src/native/realm_core.dart:82:37)
E/flutter (29147): #4      realmCore (package:realm_dart/src/native/realm_core.dart:51:30)
E/flutter (29147): #5      realmCore (package:realm_dart/src/native/realm_core.dart)
E/flutter (29147): #6      Configuration.defaultStoragePath (package:realm_dart/src/configuration.dart:100:14)
E/flutter (29147): #7      Configuration.defaultRealmPath (package:realm_dart/src/configuration.dart:110:47)
E/flutter (29147): #8      Configuration.defaultRealmPath (package:realm_dart/src/configuration.dart)
E/flutter (29147): #9      new AppConfiguration (package:realm_dart/src/app.dart:102:78)
E/flutter (29147): #10     new AppServices (package:at/realm.dart:16:20)
E/flutter (29147): #11     MyApp.build.<anonymous closure> (package:at/main.dart:85:17)
E/flutter (29147): #12     _CreateInheritedProviderState.value (package:provider/src/inherited_provider.dart:729:36)
E/flutter (29147): #13     _InheritedProviderScopeElement.value (package:provider/src/inherited_provider.dart:583:33)
E/flutter (29147): #14     Provider.of (package:provider/src/provider.dart:303:37)
E/flutter (29147): #15     _LoginState.authenticateRealm (package:at/module/authentication/screens/login/login.dart:25:24)
E/flutter (29147): #16     _LoginState.build.<anonymous closure> (package:at/module/authentication/screens/login/login.dart:163:13)
E/flutter (29147): #17     _BlocListenerBaseState._subscribe.<anonymous closure> (package:flutter_bloc/src/bloc_listener.dart:204:24)
E/flutter (29147): #18     _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
E/flutter (29147): #19     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (29147): #20     _DelayedData.perform (dart:async/stream_impl.dart:515:14)
E/flutter (29147): #21     _PendingEvents.handleNext (dart:async/stream_impl.dart:620:11)
E/flutter (29147): #22     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:591:7)
E/flutter (29147): #23     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (29147): #24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

@HawkeW
Copy link

HawkeW commented Dec 26, 2022

kn/update-analyzer

I met the same issue today and solved it by running flutter clean and flutter pub get

@nielsenko
Copy link
Contributor

@Rakshak1344 Did you build the native library?

@Rakshak1344
Copy link
Author

@nielsenko, I did not build natively. Can you guide me on it what exactly to be done?

I could not reply to you back, I had no access.

@nielsenko
Copy link
Contributor

Follow CONTRIBUTING.md and remember to take a path dependency in your project. You need CMAKE and an appropriate C++ tool chain for you platform.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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.

4 participants