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

Target dart2js failed: ProcessException: Process exited abnormally with exit code 253: ../../../.pub-cache/hosted/pub.dev/share_plus-9.0.0/lib/src/share_plus_web.dart:264:20: Internal Error: Unknown external method j:method(ShareData|constructor#files) external factory ShareData.files({ #56354

Open
the-mrinal opened this issue Jul 31, 2024 · 2 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-js-interop Issues that impact all js interop

Comments

@the-mrinal
Copy link

  • MacOS ( Sonoma 14.5)
  • Apple M2 16Gb (Mac mini)
  • Dart - 3.3.0

The compiler crashed: Assertion failure: Unknown external method j:method(ShareData|constructor#files)
#0 failedAt (package:compiler/src/diagnostics/invariant.dart:39:3)
#1 KernelSsaGraphBuilder._buildExternalFunctionNode (package:compiler/src/ssa/builder.dart:1825:5)
#2 KernelSsaGraphBuilder.build. (package:compiler/src/ssa/builder.dart:439:15)
#3 DiagnosticReporter.withCurrentElement (package:compiler/src/diagnostics/diagnostic_listener.dart:154:15)
#4 KernelSsaGraphBuilder.build (package:compiler/src/ssa/builder.dart:427:21)
#5 KernelSsaBuilder.build. (package:compiler/src/js_model/js_strategy.dart:525:22)
#6 CompilerTask.measure (package:compiler/src/common/tasks.dart:66:51)
#7 KernelSsaBuilder.build (package:compiler/src/js_model/js_strategy.dart:507:18)
#8 SsaBuilderTask.build (package:compiler/src/ssa/ssa.dart:365:21)
#9 SsaFunctionCompiler.compile (package:compiler/src/ssa/ssa.dart:99:28)
#10 OnDemandCodegenResults.getCodegenResults (package:compiler/src/common/codegen.dart:409:30)
#11 JsBackendStrategy.generateCode (package:compiler/src/js_model/js_strategy.dart:331:43)
#12 KernelCodegenWorkItem.run (package:compiler/src/js_model/js_strategy.dart:466:29)
#13 Compiler.emptyQueue..... (package:compiler/src/compiler.dart:752:70)
#14 CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#15 Compiler.emptyQueue.... (package:compiler/src/compiler.dart:752:32)
#16 CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#17 Compiler.emptyQueue... (package:compiler/src/compiler.dart:750:28)
#18 DiagnosticReporter.withCurrentElement (package:compiler/src/diagnostics/diagnostic_listener.dart:154:15)
#19 Compiler.emptyQueue.. (package:compiler/src/compiler.dart:748:18)
#20 CodegenEnqueuer._forEach (package:compiler/src/js_backend/enqueuer.dart:266:12)
#21 CodegenEnqueuer.forEach (package:compiler/src/js_backend/enqueuer.dart:282:5)
#22 Compiler.emptyQueue. (package:compiler/src/compiler.dart:744:16)
#23 CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#24 Compiler.emptyQueue (package:compiler/src/compiler.dart:743:14)
#25 Compiler.processQueue. (package:compiler/src/compiler.dart:767:7)
#26 CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#27 Compiler.processQueue (package:compiler/src/compiler.dart:761:14)
#28 Compiler.runCodegenEnqueuer (package:compiler/src/compiler.dart:472:5)
#29 Compiler.runSequentialPhases (package:compiler/src/compiler.dart:680:27)

#30 Compiler.runInternal. (package:compiler/src/compiler.dart:315:7)

#31 Compiler.runInternal (package:compiler/src/compiler.dart:314:5)

#32 Compiler.run. (package:compiler/src/compiler.dart:235:11)

#33 compile. (package:compiler/compiler_api.dart:256:30)

#34 compile.compilationDone (package:compiler/src/dart2js.dart:729:3)

#35 main (package:compiler/src/dart2js.dart:1233:3)

Command: /Users/mrinal/fvm/versions/3.19.0/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/mrinal/fvm/versions/3.19.0/bin/cache/dart-sdk/bin/snapshots/dart2js.dart.snapshot
--platform-binaries=/Users/mrinal/fvm/versions/3.19.0/bin/cache/flutter_web_sdk/kernel --invoker=flutter_tool -Ddart.vm.product=true -DFLUTTER_WEB_AUTO_DETECT=true
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/04817c99c9fd4956f27505204f7e344335810aed/ --native-null-assertions --no-source-maps -O4 -o
/Users/mrinal/Developer/Cashew/budget/.dart_tool/flutter_build/846120b4c5c0513ff1e25f1352e8304a/main.dart.js /Users/mrinal/Developer/Cashew/budget/.dart_tool/flutter_build/846120b4c5c0513ff1e25f1352e8304a/app.dill
#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:127:5)
#1 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:326:19)

#2 Dart2JSTarget.build (package:flutter_tools/src/build_system/targets/web.dart:192:5)

#3 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:861:9)

#4 Future.wait. (dart:async/future.dart:518:21)

#5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:799:32)

#6 Future.wait. (dart:async/future.dart:518:21)

#7 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:799:32)

#8 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:628:16)

#9 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:93:34)

#10 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:200:5)

#11 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1389:27)

#12 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#13 CommandRunner.runCommand (package:args/command_runner.dart:212:13)

#14 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9)

#15 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:295:5)

#17 run.. (package:flutter_tools/runner.dart:119:9)

#18 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#19 main (package:flutter_tools/executable.dart:90:3)

Compiling lib/main.dart for the Web... 27.5s
Error: Failed to compile application for the Web.

@dart-github-bot
Copy link
Collaborator

Summary: The dart2js compiler crashed while compiling the share_plus package due to an unknown external method call related to the ShareData.files constructor. This indicates a potential incompatibility between the share_plus package and the current dart2js compiler version.

@dart-github-bot dart-github-bot added area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jul 31, 2024
@srujzs srujzs added the web-js-interop Issues that impact all js interop label Jul 31, 2024
@srujzs
Copy link
Contributor

srujzs commented Jul 31, 2024

Duplicate of #54801

This should be cherry-picked into 3.3 so I'd try a more recent version of 3.3 (like 3.3.4).

@srujzs srujzs marked this as a duplicate of #54801 Jul 31, 2024
@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-js-interop Issues that impact all js interop
Projects
None yet
Development

No branches or pull requests

4 participants