reown-com / reown_flutter

Reown is the onchain UX platform that provides toolkits built on top of the WalletConnect Network that enable builders to create onchain user experiences that make digital ownership effortless, intuitive, and secure.
https://docs.reown.com
Apache License 2.0
16 stars 9 forks source link

Build fails #18

Open agamkohli9 opened 1 day ago

agamkohli9 commented 1 day ago

Describe the bug Unable to build WalletKit example. I'd really appreciate some guidance. I've tried both flavors and many different channels and releases of flutter.

To Reproduce Steps to reproduce the behavior:

agamkohli@Agams-MacBook-Pro ~/Downloads> git clone https://github.com/reown-com/reown_flutter.git
Cloning into 'reown_flutter'...
remote: Enumerating objects: 3577, done.
remote: Counting objects: 100% (610/610), done.
remote: Compressing objects: 100% (396/396), done.
remote: Total 3577 (delta 335), reused 396 (delta 210), pack-reused 2967 (from 1)
Receiving objects: 100% (3577/3577), 7.81 MiB | 13.41 MiB/s, done.
Resolving deltas: 100% (1587/1587), done.
agamkohli@Agams-MacBook-Pro ~/Downloads> cd reown_flutter/packages/reown_walletkit/example/
AppIcon.png            android/               linux/                 packages/              web/
README.md              ios/                   macos/                 pubspec.yaml           windows/
analysis_options.yaml  lib/                   netlify.toml           test/
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.26.0-0.1.pre, on macOS 14.1 23B2073 darwin-arm64, locale en-US)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 3 categories.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter clean
Cleaning Xcode workspace...                                      1,535ms
Cleaning Xcode workspace...                                      1,444ms
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter pub cache clean
This will remove everything inside /Users/agamkohli/.pub-cache.
You will have to run `flutter pub get` again in each project.
Are you sure? (y/N)? y
Removing pub cache directory /Users/agamkohli/.pub-cache.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter pub get
Resolving dependencies... (1.1s)
Downloading packages... (2.1s)
+ _fe_analyzer_shared 73.0.0 (76.0.0 available)
+ _macros 0.3.2 from sdk dart
+ adaptive_number 1.0.0
+ analyzer 6.8.0 (6.11.0 available)
+ args 2.6.0
+ async 2.11.0
+ base_codecs 1.0.1
+ base_x 2.0.1
+ bip39 1.0.6
+ bip39_mnemonic 3.0.6
+ blake2b 0.2.3
+ boolean_selector 2.1.1
+ borsh_annotation 0.3.1+5
+ bs58 1.0.2
+ buffer 1.2.3
+ build 2.4.1
+ build_config 1.1.1
+ build_daemon 4.0.2
+ build_resolvers 2.4.2
+ build_runner 2.4.13
+ build_runner_core 7.3.2
+ built_collection 5.1.1
+ built_value 8.9.2
+ characters 1.3.0
+ checked_yaml 2.0.3
+ clock 1.1.1
+ code_builder 4.10.0
+ collection 1.19.0
+ connectivity_plus 6.0.5
+ connectivity_plus_platform_interface 2.0.1
+ convert 3.1.1
+ crypto 3.0.5
+ cryptography 2.7.0
+ cupertino_icons 1.0.8
+ dart_style 2.3.7
+ dbus 0.7.10
+ decimal 2.3.3 (3.0.2 available)
+ dependency_validator 3.2.3 (4.1.1 available)
+ ed25519_edwards 0.3.1
+ ed25519_hd_key 2.2.1 (2.3.0 available)
+ edwards25519 1.0.4
+ eip1559 0.6.2
+ eip55 1.0.2
+ equatable 2.0.5
+ eth_sig_util 0.0.9
+ event 2.1.2 (3.1.0 available)
+ fake_async 1.3.1
+ ffi 2.1.3
+ file 7.0.1
+ fixnum 1.1.0
+ fl_toast 3.2.0
+ flutter 0.0.0 from sdk flutter
+ flutter_curve25519 0.1.2
+ flutter_lints 2.0.3 (5.0.0 available)
+ flutter_svg 2.0.10+1
+ flutter_test 0.0.0 from sdk flutter
+ flutter_web_plugins 0.0.0 from sdk flutter
+ freezed_annotation 2.4.4
+ frontend_server_client 4.0.0
+ functional_listener 2.3.1 (4.1.0 available)
+ get_it 7.7.0 (8.0.0 available)
+ get_it_mixin 4.2.2
+ glob 2.1.2
+ graphs 2.3.2
+ hashlib_codecs 2.6.0
+ hex 0.2.0
+ http 1.2.2
+ http_multi_server 3.2.1
+ http_parser 4.1.0
+ intl 0.18.1 (0.19.0 available)
+ io 1.0.4
+ js 0.6.7 (0.7.1 available)
+ json_annotation 4.9.0
+ json_rpc_2 3.0.2
+ json_schema2 2.0.4+9 (5.1.3 available)
+ json_serializable 6.8.0
+ kadena_dart_sdk 2.3.2
+ leak_tracker 10.0.7
+ leak_tracker_flutter_testing 3.0.8
+ leak_tracker_testing 3.0.1
+ lints 2.1.1 (5.1.0 available)
+ logger 2.4.0
+ logging 1.2.0
+ macros 0.1.2-main.4 (0.1.3-main.0 available)
+ matcher 0.12.16+1
+ material_color_utilities 0.11.1 (0.12.0 available)
+ merlin 1.0.3
+ meta 1.15.0 (1.16.0 available)
+ mime 2.0.0
+ nm 0.5.0
+ package_config 2.1.0
+ package_info_plus 7.0.0 (8.0.3 available)
+ package_info_plus_platform_interface 3.0.1
+ path 1.9.0
+ path_parsing 1.0.1
+ path_provider_linux 2.2.1
+ path_provider_platform_interface 2.1.2
+ path_provider_windows 2.3.0
+ petitparser 6.0.2
+ pinenacl 0.5.1 (0.6.0 available)
+ platform 3.1.5
+ plugin_platform_interface 2.1.8
+ pointycastle 3.9.1
+ polkadart 0.4.7
+ polkadart_keyring 0.4.4
+ polkadart_scale_codec 1.2.1
+ pool 1.5.1
+ pub_semver 2.1.4
+ pubspec_parse 1.3.0
+ qr_bar_code_scanner_dialog 0.0.5 from path packages/qr-bar-code-scanner-dialog
+ qr_code_scanner 1.0.0 from path packages/qr-bar-code-scanner-dialog/packages/qr_code_scanner
+ quiver 3.2.2
+ rational 2.2.3
+ reown_core 1.0.0 (1.0.1 available)
+ reown_sign 1.0.0 (1.0.1 available)
+ reown_walletkit 1.0.1 from path ..
+ rest_client 2.4.0
+ ristretto255 1.0.2
+ sec 1.1.0
+ secp256k1_ecdsa 0.4.1
+ shared_preferences 2.3.2
+ shared_preferences_android 2.3.3
+ shared_preferences_foundation 2.5.3
+ shared_preferences_linux 2.4.1
+ shared_preferences_platform_interface 2.4.1
+ shared_preferences_web 2.4.2
+ shared_preferences_windows 2.4.1
+ shelf 1.4.2
+ shelf_web_socket 2.0.0
+ sky_engine 0.0.0 from sdk flutter
+ solana 0.30.4 (0.31.0 available)
+ solana_borsh 0.0.1
+ solana_buffer 0.0.1
+ solana_common 0.1.0+1
+ solana_jsonrpc 0.0.1
+ solana_web3 0.1.3
+ source_gen 1.5.0
+ source_helper 1.3.4
+ source_span 1.10.0
+ sprintf 7.0.0
+ sr25519 0.4.1
+ ss58 1.1.3
+ stack_trace 1.11.1 (1.12.0 available)
+ stream_channel 2.1.2
+ stream_transform 2.1.0
+ string_scanner 1.3.0
+ strobe 1.0.4
+ substrate_bip39 0.4.1
+ substrate_metadata 1.2.2
+ synchronized 3.3.0+3
+ term_glyph 1.2.1
+ test_api 0.7.3
+ timing 1.0.1
+ typed_data 1.3.2
+ unorm_dart 0.2.0 (0.3.0 available)
+ uri 1.0.0
+ url_launcher 6.3.1
+ url_launcher_android 6.3.12
+ url_launcher_ios 6.3.1
+ url_launcher_linux 3.2.0
+ url_launcher_macos 3.2.1
+ url_launcher_platform_interface 2.3.2
+ url_launcher_web 2.3.3
+ url_launcher_windows 3.1.2
+ utility 1.0.3
+ uuid 4.5.1
+ vector_graphics 1.1.11+1
+ vector_graphics_codec 1.1.11+1
+ vector_graphics_compiler 1.1.11+1
+ vector_math 2.1.4
+ vm_service 14.2.5 (14.3.0 available)
+ wallet 0.0.13
+ watcher 1.1.0
+ web 0.5.1 (1.1.0 available)
+ web3dart 2.7.3
+ web_socket_channel 2.4.5 (3.0.1 available)
+ win32 5.6.0
+ x25519 0.1.1
+ xdg_directories 1.1.0
+ xml 6.5.0
+ yaml 3.1.2
+ yaon 1.1.4+10
Changed 182 dependencies!
26 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter run --dart-define=PROJECT_ID= **<REDACTED>** --flavor internal
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
ios/Runner/AppDelegate.swift uses the deprecated @UIApplicationMain attribute, updating.
Running pod install...                                             626ms
Running Xcode build...
Xcode build done.                                            9.1s
Failed to build iOS app
Error (Xcode): ../../../../../.pub-cache/hosted/pub.dev/pinenacl-0.5.1/lib/api/api.dart:90:12: Error: Method not found: 'UnmodifiableUint8ListView'.

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop) [1]> flutter pub upgrade --major-versions
Resolving dependencies... (1.1s)
Changed 4 constraints in pubspec.yaml:
  package_info_plus: ^7.0.0 -> ^8.0.3
  solana: ^0.30.4 -> ^0.31.0
  dependency_validator: ^3.2.2 -> ^4.1.1
  flutter_lints: ^2.0.0 -> ^5.0.0
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 73.0.0 (76.0.0 available)
  analyzer 6.8.0 (6.11.0 available)
  decimal 2.3.3 (3.0.2 available)
> dependency_validator 4.1.1 (was 3.2.3)
  ed25519_hd_key 2.2.1 (2.3.0 available)
  event 2.1.2 (3.1.0 available)
> flutter_lints 5.0.0 (was 2.0.3)
  functional_listener 2.3.1 (4.1.0 available)
  get_it 7.7.0 (8.0.0 available)
  intl 0.18.1 (0.19.0 available)
  js 0.6.7 (0.7.1 available)
  json_schema2 2.0.4+9 (5.1.3 available)
> lints 5.1.0 (was 2.1.1)
  macros 0.1.2-main.4 (0.1.3-main.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
> package_info_plus 8.0.3 (was 7.0.0)
  pinenacl 0.5.1 (0.6.0 available)
> reown_core 1.0.1 (was 1.0.0)
> reown_sign 1.0.1 (was 1.0.0)
> solana 0.31.0 (was 0.30.4)
  stack_trace 1.11.1 (1.12.0 available)
  unorm_dart 0.2.0 (0.3.0 available)
  vm_service 14.2.5 (14.3.0 available)
  web 0.5.1 (1.1.0 available)
  web_socket_channel 2.4.5 (3.0.1 available)
Changed 7 dependencies!
19 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop)> flutter run --dart-define=PROJECT_ID=**<REDACTED>** --flavor internal
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 73.0.0 (76.0.0 available)
  analyzer 6.8.0 (6.11.0 available)
  decimal 2.3.3 (3.0.2 available)
  ed25519_hd_key 2.2.1 (2.3.0 available)
  event 2.1.2 (3.1.0 available)
  functional_listener 2.3.1 (4.1.0 available)
  get_it 7.7.0 (8.0.0 available)
  intl 0.18.1 (0.19.0 available)
  js 0.6.7 (0.7.1 available)
  json_schema2 2.0.4+9 (5.1.3 available)
  macros 0.1.2-main.4 (0.1.3-main.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  pinenacl 0.5.1 (0.6.0 available)
  stack_trace 1.11.1 (1.12.0 available)
  unorm_dart 0.2.0 (0.3.0 available)
  vm_service 14.2.5 (14.3.0 available)
  web 0.5.1 (1.1.0 available)
  web_socket_channel 2.4.5 (3.0.1 available)
Got dependencies!
19 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running pod install...                                             637ms
Running Xcode build...
Xcode build done.                                            8.6s
Failed to build iOS app
Error (Xcode): lib/dependencies/walletkit_service.dart:151:21: Error: Type 'LogEvent' not found.

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
agamkohli@Agams-MacBook-Pro ~/D/r/p/r/example (develop) [1]>
quetool commented 22 hours ago

Thanks @agamkohli9 ! I'll take a look!

quetool commented 22 hours ago

By the way, after cloning, inside reown_flutter folder, did you run $ sh scripts/generate_all.sh?

So, steps should be:

  1. $ git clone https://github.com/reown-com/reown_flutter.git
  2. $ cd reown_flutter
  3. $ sh scripts/generate_all.sh
  4. $ cd packages/reown_walletkit/example/
  5. $ flutter run --dart-define="PROJECT_ID=0123..." --flavor internal