Build web issue with the flutter sdk version on github action

Project Settings

Run flutter build web --release --output=.firebase/complinacecheck-us-app-e0521/hosting

8Compiling lib/main.dart for the Web...

9Target dart2js failed: ProcessException: Process exited abnormally with exit code 1:

10/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/lib/src/link.dart:239:13:

11Error: The operator '[]=' isn't defined for the class 'HTMLElement'.

12 - 'HTMLElement' is from 'package:web/src/dom/html.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/html.dart').

13 _element[linkViewIdProperty] = viewId.toJS;

14 ^

15/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/lib/src/link.dart:374:24:

16Error: The method 'getProperty' isn't defined for the class 'Element'.

17 - 'Element' is from 'package:web/src/dom/dom.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/dom.dart').

18 return linkElement.getProperty<JSNumber>(linkViewIdProperty.toJS).toDartInt;

19 ^^^^^^^^^^^

20/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/lib/src/link.dart:403:15:

21Error: The method 'hasProperty' isn't defined for the class 'Element'.

22 - 'Element' is from 'package:web/src/dom/dom.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/dom.dart').

23 element.hasProperty(linkViewIdProperty.toJS).toDart;

24 ^^^^^^^^^^^

25/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/go_router-12.1.3/lib/src/information_provider.dart:131:34:

26Warning: Operand of null-aware operation '!' has type 'String' which excludes null.

27 location: routeInformation.location!,

28 ^

29/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/go_router-12.1.3/lib/src/parser.dart:90:50:

30Warning: Operand of null-aware operation '!' has type 'String' which excludes null.

31 configuration.findMatch(routeInformation.location!, extra: state.extra);

32 ^

33/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/cross_file-0.3.4+1/lib/src/types/html.dart:69:47:

34Error: The argument type 'Blob' can't be assigned to the parameter type 'JSObject'.

35 - 'Blob' is from 'package:web/src/dom/fileapi.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/web-0.4.2/lib/src/dom/fileapi.dart').

36 path = URL.createObjectURL(browserBlob!);

37 ^

38/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/sticky_headers-0.3.0+2/lib/sticky_headers/widget.dart:63:63:

39Warning: Operand of null-aware operation '!' has type 'ScrollableState' which excludes null.

40 - 'ScrollableState' is from 'package:flutter/src/widgets/scrollable.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/packages/flutter/lib/src/widgets/scrollable.dart').

41 final scrollPosition = controller?.position ?? Scrollable.of(context)!.position;

42 ^

43/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/sticky_headers-0.3.0+2/lib/sticky_headers/widget.dart:73:63:

44Warning: Operand of null-aware operation '!' has type 'ScrollableState' which excludes null.

45 - 'ScrollableState' is from 'package:flutter/src/widgets/scrollable.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/packages/flutter/lib/src/widgets/scrollable.dart').

46 final scrollPosition = controller?.position ?? Scrollable.of(context)!.position;

47 ^

48Error: Compilation failed.

49 Command: /opt/hostedtoolcache/flutter/3.19.6-stable/x64/bin/cache/dart-sdk/bin/dart --disable-dart-dev /opt/hostedtoolcache/flutter/3.19.6-stable/x64/bin/cache/dart-sdk/bin/snapshots/dart2js.dart.snapshot --platform-binaries=/opt/hostedtoolcache/flutter/3.19.6-stable/x64/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/c4cd48e186460b32d44585ce3c103271ab676355/ --native-null-assertions --no-source-maps -o /home/runner/work/complinacecheck-us-app/complinacecheck-us-app/.dart_tool/flutter_build/f7ef060cebecbe3241ce4f78d529af4f/app.dill --packages=.dart_tool/package_config.json --cfe-only /home/runner/work/complinacecheck-us-app/complinacecheck-us-app/.dart_tool/flutter_build/f7ef060cebecbe3241ce4f78d529af4f/main.dart

50#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:127:5)

51#1 DefaultProcessUtils.run (package:fluttertools/src/base/process.dart:326:19)

52<asynchronous suspension>

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

54<asynchronous suspension>

55#3 BuildInstance.invokeInternal (package:flutter_tools/src/build_system/build_system.dart:861:9)

56<asynchronous suspension>

57#4 Future.wait.<anonymous closure> (dart:async/future.dart:518:21)

58<asynchronous suspension>

59#5 BuildInstance.invokeTarget (package:fluttertools/src/build_system/build_system.dart:799:32)

60<asynchronous suspension>

61#6 Future.wait.<anonymous closure> (dart:async/future.dart:518:21)

62<asynchronous suspension>

63#7 BuildInstance.invokeTarget (package:fluttertools/src/build_system/build_system.dart:799:32)

64<asynchronous suspension>

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

66<asynchronous suspension>

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

68<asynchronous suspension>

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

70<asynchronous suspension>

71#11 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1389:27)

72<asynchronous suspension>

73#12 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)

74<asynchronous suspension>

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

76<asynchronous suspension>

77#14 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9)

78<asynchronous suspension>

79#15 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)

80<asynchronous suspension>

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

82<asynchronous suspension>

83#17 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:119:9)

84<asynchronous suspension>

85#18 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)

86<asynchronous suspension>

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

88<asynchronous suspension>

89Error: Failed to compile application for the Web.

90Compiling lib/main.dart for the Web... 26.4s

91Error: Process completed with exit code 1.

What have you tried so far?

tried multiple versions

Did you check FlutterFlow's Documentation for this topic?
No
1
2 replies