HomeiOS DevelopmentError: Not discovered: 'dart:js' when operating flutter app in ios simulator

Error: Not discovered: ‘dart:js’ when operating flutter app in ios simulator


The venture was operating with none error earlier than. Then I up to date the Xcode from 13 to 14 and all of a sudden the app stopped working and throws the next error.

[  +16 ms] /Customers/arunmaharjan/Improvement/sdks/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Customers/arunmaharjan/Improvement/sdks/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /Customers/arunmaharjan/Improvement/sdks/flutter/bin/cache/artifacts/engine/frequent/flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DAPP_ENV=manufacturing -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages /Customers/arunmaharjan/Blacksheep/initiatives/flutter/swg_pro/.dart_tool/package_config.json --output-dill /Customers/arunmaharjan/Blacksheep/initiatives/flutter/swg_pro/.dart_tool/flutter_build/b510feac84446de731c63e92801e95fa/app.dill --depfile /Customers/arunmaharjan/Blacksheep/initiatives/flutter/swg_pro/.dart_tool/flutter_build/b510feac84446de731c63e92801e95fa/kernel_snapshot.d /Customers/arunmaharjan/Blacksheep/initiatives/flutter/swg_profff/.dart_tool/flutter_build/generated_main.dart
               [  +81 ms] Persisting file retailer
               [   +7 ms] Achieved persisting file retailer
               [  +16 ms] "flutter assemble" took 14,451ms.
               [   +7 ms] ensureAnalyticsSent: 3ms
               [   +1 ms] Working shutdown hooks
               [        ] Shutdown hooks full
               [   +3 ms] exiting with code 1
[+1394 ms] ../../../../.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js.dart:8:1: Error: Not discovered: 'dart:js'
js.dart:8
               [   +8 ms] export 'dart:js' present allowInterop, allowInteropCaptureThis;
               [        ] ^
[ +249 ms] ../../../../.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js_util.dart:8:1: Error: Not discovered: 'dart:js_util'
js_util.dart:8
               [        ] export 'dart:js_util';
               [        ] ^
[+2226 ms] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not discovered: 'FirebaseAppPlatform.verifyExtends'.
firebase_app.dart:18
               [        ]     FirebaseAppPlatform.verifyExtends(_delegate);
               [        ]                         ^^^^^^^^^^^^^
[+3205 ms] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/js_interop.dart:25:12: Error: Methodology not discovered: 'hasProperty'.
js_interop.dart:25
               [        ]   if (util.hasProperty(jsObject, 'toDateString')) {
               [        ]            ^^^^^^^^^^^
[   +1 ms] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:45:31: Error: Methodology not discovered: 'getProperty'.
utils.dart:45
               [        ]       map[key] = dartify(util.getProperty(jsObject, key), customDartify);
               [        ]                               ^^^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:81:22: Error: Methodology not discovered: 'newObject'.
utils.dart:81
               [        ]     var jsMap = util.newObject();
               [        ]                      ^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:83:12: Error: Methodology not discovered: 'setProperty'.
utils.dart:83
               [        ]       util.setProperty(jsMap, key, jsify(worth, customJsify));
               [        ]            ^^^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:89:12: Error: Methodology not discovered: 'allowInterop'.
utils.dart:89
               [        ]     return allowInterop(dartObject);
               [        ]            ^^^^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:103:10: Error: Methodology not discovered: 'callMethod'.
utils.dart:103
               [        ]     util.callMethod(jsObject, technique, args);
               [        ]          ^^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:116:15: Error: Methodology not discovered: 'promiseToFuture'.
utils.dart:116
               [        ]   return util.promiseToFuture(thenable);
               [        ]               ^^^^^^^^^^^^^^^
[        ] ../../../../.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/lib/src/interop/utils/utils.dart:124:27: Error: Methodology not discovered: 'allowInterop'.
utils.dart:124
               [        ]   return PromiseJsImpl<S>(allowInterop((
               [        ]                           ^^^^^^^^^^^^
               [+5040 ms] Unhandled exception:
                          FileSystemException(uri=org-dartlang-untranslatable-uri:dartpercent3Ajs; message=StandardFileSystem solely helps file:* and knowledge:* URIs)
#0      StandardFileSystem.entityForUri (bundle:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1      asFileUri (bundle:vm/kernel_front_end.dart:623:37)
#2      writeDepfile (bundle:vm/kernel_front_end.dart:763:21)
                          <asynchronous suspension>
#3      FrontendCompiler.compile (bundle:frontend_server/frontend_server.dart:586:9)
                          <asynchronous suspension>
#4      starter (bundle:flutter_frontend_server/server.dart:85:12)
                          <asynchronous suspension>
#5      fundamental (file:///choose/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
                          <asynchronous suspension>
               [   +6 ms] Goal kernel_snapshot failed: Exception
#0      KernelSnapshot.construct (bundle:flutter_tools/src/build_system/targets/frequent.dart:241:7)
                          <asynchronous suspension>
#1      _BuildInstance._invokeInternal (bundle:flutter_tools/src/build_system/build_system.dart:839:9)
                          <asynchronous suspension>
#2      Future.wait.<nameless closure> (dart:async/future.dart:473:21)
                          <asynchronous suspension>
#3      _BuildInstance.invokeTarget (bundle:flutter_tools/src/build_system/build_system.dart:777:32)
                          <asynchronous suspension>
#4      FlutterBuildSystem.construct (bundle:flutter_tools/src/build_system/build_system.dart:606:16)
                          <asynchronous suspension>
#5      AssembleCommand.runCommand (bundle:flutter_tools/src/instructions/assemble.dart:317:32)
                          <asynchronous suspension>
#6      FlutterCommand.run.<nameless closure> (bundle:flutter_tools/src/runner/flutter_command.dart:1161:27)
                          <asynchronous suspension>
#7      AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#8      CommandRunner.runCommand
command_runner.dart:209
                          <asynchronous suspension>
#9      FlutterCommandRunner.runCommand.<nameless closure> (bundle:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
#10     AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#11     FlutterCommandRunner.runCommand (bundle:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
                          <asynchronous suspension>
#12     run.<nameless closure>.<nameless closure> (bundle:flutter_tools/runner.dart:62:9)
                          <asynchronous suspension>
#13     AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#14     fundamental (bundle:flutter_tools/executable.dart:94:3)
                          <asynchronous suspension>
               [   +5 ms]
#0      throwToolExit (bundle:flutter_tools/src/base/frequent.dart:10:3)
#1      AssembleCommand.runCommand (bundle:flutter_tools/src/instructions/assemble.dart:334:7)
                          <asynchronous suspension>
#2      FlutterCommand.run.<nameless closure> (bundle:flutter_tools/src/runner/flutter_command.dart:1161:27)
                          <asynchronous suspension>
#3      AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#4      CommandRunner.runCommand
command_runner.dart:209
                          <asynchronous suspension>
#5      FlutterCommandRunner.runCommand.<nameless closure> (bundle:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
                          <asynchronous suspension>
#6      AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#7      FlutterCommandRunner.runCommand (bundle:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
                          <asynchronous suspension>
#8      run.<nameless closure>.<nameless closure> (bundle:flutter_tools/runner.dart:62:9)
                          <asynchronous suspension>
#9      AppContext.run.<nameless closure> (bundle:flutter_tools/src/base/context.dart:150:19)
                          <asynchronous suspension>
#10     fundamental (bundle:flutter_tools/executable.dart:94:3)
                          <asynchronous suspension>
               Didn't bundle /Customers/arunmaharjan/Blacksheep/initiatives/flutter/swg_pro.
               Command PhaseScriptExecution failed with a nonzero exit code
               warning: Run script construct section 'Run Script' shall be run throughout each construct as a result of it doesn't specify any outputs. To deal with this warning, both add output dependencies to the script section, or configure it to run in each construct by unchecking "Primarily based on dependency evaluation" within the script section. (in goal 'Runner' from venture 'Runner')
               warning: Run script construct section 'Skinny Binary' shall be run throughout each construct as a result of it doesn't specify any outputs. To deal with this warning, both add output dependencies to the script section, or configure it to run in each construct by unchecking "Primarily based on dependency evaluation" within the script section. (in goal 'Runner' from venture 'Runner')
               Outcome bundle written to path:
                /var/folders/x_/hj62v_0j67d7wq80vgl5btr00000gn/T/flutter_tools.ABVYp9/flutter_ios_build_temp_dir5dmQTT/temporary_xcresult_bundle
[+1037 ms] Couldn't construct the applying for the simulator.
[   +9 ms] Error launching utility on iPhone 14 Professional Max.
Exited (sigterm)
~ flutter physician -v

[✓] Flutter (Channel unknown, 2.10.3, on macOS 13.2 22D49 darwin-arm, locale en-NP)
    • Flutter model 2.10.3 at /Customers/arunmaharjan/Improvement/sdks/flutter
    • Upstream repository unknown
    • Framework revision 7e9793dee1 (1 12 months, 1 month in the past), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart model 2.16.1
    • DevTools model 2.9.2

[✓] Android toolchain - develop for Android units (Android SDK model 33.0.0)
    • Android SDK at /Customers/arunmaharjan/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Functions/Android Studio.app/Contents/jre/Contents/House/bin/java
    • Java model OpenJDK Runtime Atmosphere (construct 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Functions/Xcode.app/Contents/Developer
    • CocoaPods model 1.11.3

[✓] Android Studio (model 2021.3)
    • Android Studio at /Functions/Android Studio.app/Contents
    • Flutter plugin will be put in from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin will be put in from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java model OpenJDK Runtime Atmosphere (construct 11.0.13+0-b1751.21-8125866)

[✓] VS Code (model 1.77.0)
    • VS Code at /Functions/Visible Studio Code.app/Contents
    • Flutter extension model 3.60.0

[✓] Related system (1 accessible)
    • iPhone 14 Professional Max (cellular) • 0FB13EFF-CD33-4538-A9DD-C09F3B056B68 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)

[✓] HTTP Host Availability
    • All required HTTP hosts can be found

• No points discovered!

Options I’ve tried

1.

~ flutter clear
~ cd ios && rm -rf Pods Podfile.lock
~ pod set up
# Then run the flutter venture
  1. Modified the flutter model from 2.10.3 to 2.10.5. It did not work and reverted it once more.

Under is my pubspec.yml

identify: swg_pro
description: The SWG app for the professionals.

# The next line prevents the bundle from being unintentionally printed to
# pub.dev utilizing `flutter pub publish`. That is most well-liked for personal packages.
publish_to: "none" # Take away this line for those who want to publish to pub.dev

# The next defines the model and construct quantity to your utility.
# A model quantity is three numbers separated by dots, like 1.2.43
# adopted by an non-obligatory construct quantity separated by a +.
# Each the model and the builder quantity could also be overridden in flutter
# construct by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName whereas build-number used as versionCode.
# Learn extra about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString whereas build-number used as CFBundleVersion.
# Learn extra about iOS versioning at
# https://developer.apple.com/library/archive/documentation/Common/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
model: 1.0.0+3

atmosphere:
  sdk: ">=2.16.1 <3.0.0"

# Dependencies specify different packages that your bundle wants with a purpose to work.
# To mechanically improve your bundle dependencies to the most recent variations
# take into account operating `flutter pub improve --major-versions`. Alternatively,
# dependencies will be manually up to date by altering the model numbers beneath to
# the most recent model accessible on pub.dev. To see which dependencies have newer
# variations accessible, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The next provides the Cupertino Icons font to your utility.
  # Use with the CupertinoIcons class for iOS type icons.
  cupertino_icons: ^1.0.2
  flutter_native_splash: ^2.1.6
  flutter_svg: ^1.0.3
  animations: ^2.0.2
  shared_preferences: ^2.0.13
  shared_preferences_android: ^2.0.8
  shared_preferences_ios: ^2.0.8
  dio: ^4.0.4
  flutter_dotenv: ^5.0.2
  connectivity_plus: ^2.3.0
  supplier: ^6.0.2
  fluttertoast: ^8.0.9
  pin_code_fields: ^7.3.0
  dotted_border: ^2.0.0+2
  image_picker: ^0.8.5
  file_picker: ^4.4.0
  flutter_cache_manager: ^3.3.0
  open_file: ^3.0.3
  flutter_switch: ^0.3.2
  intl: ^0.17.0
  table_calendar: ^3.0.7
  flutter_widget_from_html: ^0.8.5
  html_editor_enhanced: ^2.4.0+1
  plural_noun: ^0.1.2
  agora_rtm: ^1.1.0
  agora_rtc_engine: ^5.1.0
  permission_handler: ^9.2.0
  firebase_core: ^1.23.0
  firebase_messaging: ^13.0.3
  random_string: ^2.3.1
  slugify: ^2.0.0
  ffcache: ^1.1.0
  callkeep: ^0.3.2
  connectycube_flutter_call_kit:
    path: ./connectycube-flutter-call-kit
  navigation_history_observer: ^1.1.0
  flutter_local_notifications: ^9.2.0
  background_fetch: ^1.0.3
  audioplayers: ^1.1.1
  uuid: ^3.0.6
  device_info_plus: ^4.0.0
  sentry_flutter: ^6.12.2
  # flutter_apns_only: ^1.6.0
  flutter_ios_voip_kit: #^0.1.0
    path: ./flutter_ios_voip_kit
    # git:
    #   url: https://github.com/ad1199/flutter_ios_voip_kit
    #   ref: develop
  pusher_channels_flutter: ^2.1.0
  badges: ^2.0.3
  flutter_share: ^2.0.0
  flutter_foreground_task: ^3.10.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: "^0.10.0"

  # The "flutter_lints" bundle beneath comprises a set of advisable lints to
  # encourage good coding practices. The lint set supplied by the bundle is
  # activated within the `analysis_options.yaml` file situated on the root of your
  # bundle. See that file for details about deactivating particular lint
  # guidelines and activating further ones.
  flutter_lints: ^1.0.0

# For data on the generic Dart a part of this file, see the
# following web page: https://dart.dev/instruments/pub/pubspec

# The next part is particular to Flutter.
flutter:
  # The next line ensures that the Materials Icons font is
  # included along with your utility, as a way to use the icons in
  # the fabric Icons class.
  uses-material-design: true

  # So as to add property to your utility, add an property part, like this:
  property:
    - .env.demo
    - .env.improvement
    - .env.manufacturing
    - property/pictures/
    - property/pictures/physician/
    - property/audio/callertune.mp3
    - property/audio/call_waiting.mp3

  # A picture asset can check with a number of resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For particulars relating to including property from bundle dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # So as to add {custom} fonts to your utility, add a fonts part right here,
  # on this "flutter" part. Every entry on this checklist ought to have a
  # "household" key with the font household identify, and a "fonts" key with a
  # checklist giving the asset and different descriptors for the font. For
  # instance:
  fonts:
    - household: Poppins
      fonts:
        - asset: property/fonts/poppins-bold.ttf
          weight: 700
          type: regular
        - asset: property/fonts/poppins-semi_bold.ttf
          weight: 600
          type: regular
        - asset: property/fonts/poppins-regular.ttf
          weight: 500
          type: regular

  # For particulars relating to fonts from bundle dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

May somebody assist me determine it out?
Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments