Kaiteki-Fedi / Kaiteki

The comfy SNS client for everything, everywhere
https://kaiteki.app
GNU Affero General Public License v3.0
492 stars 31 forks source link

Does not build on MacOS due to bool not being bool? #385

Closed EzioisAwesome56 closed 1 year ago

EzioisAwesome56 commented 1 year ago

What happened?

Attempted to compile Kaiteki using the provided instructions.

Attempting to build throws the following error about lib/fediverse/backends/misskey/adapter.c.dart and stops the build entirely image

Expected behavior

Kaiteki should be able to build successfully

How to reproduce

  1. install flutter master via git clone
  2. clone kaiteki
  3. attempt to run flutter pub get
  4. run flutter pub add material_color_utilities:^0.5.0 to fix error about material color (picture below) image
  5. run flutter build macos
  6. wait
  7. observe build failure as shown above

What platform are you seeing the issue on?

None

Additional context

Attempting to build on Apple MacOS 12.6.6 (Intel x86_64) flutter --version output:

Flutter 3.11.0-14.0.pre.70 • channel master • https://github.com/flutter/flutter.git
Framework • revision bd11ef06fd (11 hours ago) • 2023-05-29 11:50:25 -0400
Engine • revision f768be1078
Tools • Dart 3.1.0 (build 3.1.0-155.0.dev) • DevTools 2.23.1

Cocoapods was installed via homebrew instead of system ruby Running with xCode 14.2

SputNikPlop commented 1 year ago

I am way from my computer, may you try it with the beta branch instead of the master branch. I suspect there still is an issue which I can fix when I get back.

EzioisAwesome56 commented 1 year ago

I am way from my computer, may you try it with the beta branch instead of the master branch. I suspect there still is an issue which I can fix when I get back.

there is no beta branch of kaiteki though, unless you meant the beta branch of something else

SputNikPlop commented 1 year ago

I am way from my computer, may you try it with the beta branch instead of the master branch. I suspect there still is an issue which I can fix when I get back.

there is no beta branch of kaiteki though, unless you meant the beta branch of something else

My apologies for not making it clear I meant the flutter beta channel so "flutter channel beta"

EzioisAwesome56 commented 1 year ago

My apologies for not making it clear I meant the flutter beta channel so "flutter channel beta"

not a problem, my bad

anyway, switched to the flutter beta channel and tried to compile from a fresh clone; same problem image

exact flutter version is:

Flutter 3.11.0-0.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 350d2c3a6c (7 days ago) • 2023-05-23 15:52:05 -0700
Engine • revision 7eca5cd1c5
Tools • Dart 3.1.0 (build 3.1.0-63.1.beta) • DevTools 2.23.1
SputNikPlop commented 1 year ago

Alright confirmed this is a bug will have to work on it when I get back or if someone else takes it up.

Craftplacer commented 1 year ago

This is because I updated fediverse_objects to make it accept null for Misskey's Notification.isRead. The fix is ˋisRead == falseˋ.

EzioisAwesome56 commented 1 year ago

This is because I updated fediverse_objects to make it accept null for Misskey's Notification.isRead. The fix is ˋisRead == falseˋ.

aye, this fixes the build, but it just opens to a blank window image unsure if flutter has options to print more output to terminal but all it says is two lines image

Craftplacer commented 1 year ago

Gray screen is usually the placeholder for the yellow on red error messages on release builds. You should try running flutter run instead and see if it prints something more useful like a stack trace perhaps.

EzioisAwesome56 commented 1 year ago

Gray screen is usually the placeholder for the yellow on red error messages on release builds. You should try running flutter run instead and see if it prints something more useful like a stack trace perhaps.

did this, actually got a yellow-on-red error screen along with a stack trace. both provided below

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building UncontrolledProviderScope:
Got a stack frame from package:stack_trace, where a vm or web frame was expected. This can happen if
FlutterError.demangleStackTrace was not set in an environment that propagates non-standard stack
traces to the framework, such as during tests.
'package:flutter/src/foundation/stack_frame.dart':
Failed assertion: line 180 pos 7: 'line != '===== asynchronous gap ===========================''

The relevant error-causing widget was:
  UncontrolledProviderScope
  UncontrolledProviderScope:file:///Users/mari/.pub-cache/hosted/pub.dev/flutter_riverpod-2.3.6/lib/src/framework.dart:250:12

When the exception was thrown, this was the stack:
#2      StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:180:7)
#3      MappedIterator.moveNext (dart:_internal/iterable.dart:393:20)
#4      WhereTypeIterator.moveNext (dart:_internal/iterable.dart:871:20)
#5      new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202:26)
#6      new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
#7      new List.of (dart:core-patch/array_patch.dart:47:28)
#8      Iterable.toList (dart:core/iterable.dart:494:7)
#9      StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:82:10)
#10     FlutterError.defaultStackFilter (package:flutter/src/foundation/assertions.dart:1075:54)
#11     DiagnosticsStackTrace._applyStackFilter (package:flutter/src/foundation/assertions.dart:1269:43)
#12     new DiagnosticsStackTrace (package:flutter/src/foundation/assertions.dart:1245:17)
#13     FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:732:22)
#14     DiagnosticableNode.builder.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:2891:17)
#15     DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2894:8)
#16     _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:1290:56)
#17     DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2905:77)
#18     DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1621:13)
#19     DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1650:6)
#20     WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1644:18)
#21     WidgetInspectorService._reportStructuredError (package:flutter/src/widgets/widget_inspector.dart:929:44)
#22     FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1185:14)
#23     _reportException (package:flutter/src/widgets/framework.dart:6628:16)
#24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5095:9)
#25     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#26     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#27     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5068:5)
#28     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5242:11)
#29     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5062:5)
...     Normal element mounting (7 frames)
#36     _UncontrolledProviderScopeElement.mount (package:flutter_riverpod/src/framework.dart:309:11)
...     Normal element mounting (35 frames)
#71     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3971:16)
#72     Element.updateChild (package:flutter/src/widgets/framework.dart:3708:18)
#73     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#74     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1222:5)
#75     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1169:18)
#76     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2720:19)
#77     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1168:13)
#78     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1001:7)
#79     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:981:7)
#83     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 5 frames from class _AssertionError, class _Timer, and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════

image

Craftplacer commented 1 year ago

Try pulling from the latest commit and tell me if it still doesn't work

EzioisAwesome56 commented 1 year ago

Try pulling from the latest commit and tell me if it still doesn't work

freshly cloned the repo and got what looks like the same exception as was shown in my last post image

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building UncontrolledProviderScope:
Got a stack frame from package:stack_trace, where a vm or web frame was expected. This can happen if
FlutterError.demangleStackTrace was not set in an environment that propagates non-standard stack
traces to the framework, such as during tests.
'package:flutter/src/foundation/stack_frame.dart':
Failed assertion: line 180 pos 7: 'line != '===== asynchronous gap ===========================''

The relevant error-causing widget was:
  UncontrolledProviderScope
  UncontrolledProviderScope:file:///Users/mari/.pub-cache/hosted/pub.dev/flutter_riverpod-2.3.6/lib/src/framework.dart:250:12

When the exception was thrown, this was the stack:
#2      StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:180:7)
#3      MappedIterator.moveNext (dart:_internal/iterable.dart:393:20)
#4      WhereTypeIterator.moveNext (dart:_internal/iterable.dart:871:20)
#5      new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202:26)
#6      new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
#7      new List.of (dart:core-patch/array_patch.dart:47:28)
#8      Iterable.toList (dart:core/iterable.dart:494:7)
#9      StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:82:10)
#10     FlutterError.defaultStackFilter (package:flutter/src/foundation/assertions.dart:1075:54)
#11     DiagnosticsStackTrace._applyStackFilter (package:flutter/src/foundation/assertions.dart:1269:43)
#12     new DiagnosticsStackTrace (package:flutter/src/foundation/assertions.dart:1245:17)
#13     FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:732:22)
#14     DiagnosticableNode.builder.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:2891:17)
#15     DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2894:8)
#16     _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:1290:56)
#17     DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2905:77)
#18     DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1621:13)
#19     DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1650:6)
#20     WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1644:18)
#21     WidgetInspectorService._reportStructuredError (package:flutter/src/widgets/widget_inspector.dart:929:44)
#22     FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1185:14)
#23     _reportException (package:flutter/src/widgets/framework.dart:6628:16)
#24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5095:9)
#25     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#26     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#27     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5068:5)
#28     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5242:11)
#29     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5062:5)
...     Normal element mounting (7 frames)
#36     _UncontrolledProviderScopeElement.mount (package:flutter_riverpod/src/framework.dart:309:11)
...     Normal element mounting (35 frames)
#71     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3971:16)
#72     Element.updateChild (package:flutter/src/widgets/framework.dart:3708:18)
#73     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#74     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1222:5)
#75     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1169:18)
#76     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2720:19)
#77     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1168:13)
#78     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1001:7)
#79     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:981:7)
#83     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 5 frames from class _AssertionError, class _Timer, and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════
nullobsi commented 1 year ago

i get a similar error,

check out https://stackoverflow.com/questions/73591769/got-a-stack-frame-from-packagestack-trace-where-a-vm-or-web-frame-was-expected

after following that to demangle the stacktrace, I get

Screenshot 2023-06-08 at 21 34 00
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _TypeError was thrown building KaitekiApp(dirty, dependencies:
[UncontrolledProviderScope], state: _ConsumerState#0f660):
Null check operator used on a null value

The relevant error-causing widget was:
  KaitekiApp KaitekiApp:file:///Users/nullobsi/Developer/Kaiteki/src/kaiteki/lib/main.dart:41:20

When the exception was thrown, this was the stack:
#1      _ExternalProviderSubscription.read (package:riverpod/src/framework/provider_base.dart:177:29)
#2      ConsumerStatefulElement.watch (package:flutter_riverpod/src/consumer.dart:564:8)
#3      KaitekiApp.build (package:kaiteki/app.dart:27:24)
#4      _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:479:19)
#5      StatefulElement.build (package:flutter/src/widgets/framework.dart:5410:27)
#6      ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:542:20)
#7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5298:15)
#8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5463:11)
#9      Element.rebuild (package:flutter/src/widgets/framework.dart:5017:7)
#10     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5280:5)
#11     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5454:11)
#12     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5274:5)
...     Normal element mounting (7 frames)
#19     _UncontrolledProviderScopeElement.mount (package:flutter_riverpod/src/framework.dart:309:11)
...     Normal element mounting (35 frames)
#54     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4183:16)
#55     Element.updateChild (package:flutter/src/widgets/framework.dart:3708:18)
#56     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#57     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1222:5)
#58     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1169:18)
#59     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2720:19)
#60     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1168:13)
#61     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1001:7)
#62     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:981:7)
#66     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
#67     ProviderElementBase.watch (package:riverpod/src/framework/element.dart:741:20)
#68     routerProvider.<anonymous closure> (package:kaiteki/routing/router.dart:47:23)
#69     ProviderContainer.listen (package:riverpod/src/framework/container.dart:285:21)
#70     ConsumerStatefulElement.watch.<anonymous closure> (package:flutter_riverpod/src/consumer.dart:560:25)
#71     _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:535:23)
#72     ConsumerStatefulElement.watch (package:flutter_riverpod/src/consumer.dart:553:26)
#73     KaitekiApp.build (package:kaiteki/app.dart:27:24)
#74     _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:479:19)
#75     StatefulElement.build (package:flutter/src/widgets/framework.dart:5410:27)
#76     ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:542:20)
#77     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5298:15)
#78     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5463:11)
#79     Element.rebuild (package:flutter/src/widgets/framework.dart:5017:7)
#80     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5280:5)
#81     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5454:11)
#82     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5274:5)
...     Normal element mounting (7 frames)
#89     _UncontrolledProviderScopeElement.mount (package:flutter_riverpod/src/framework.dart:309:11)
...     Normal element mounting (35 frames)
#124    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4183:16)
#125    Element.updateChild (package:flutter/src/widgets/framework.dart:3708:18)
#126    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#127    RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1222:5)
#128    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1169:18)
#129    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2720:19)
#130    RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1168:13)
#131    WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1001:7)
#132    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:981:7)
#136    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
#137    RouterNotifier.build (package:kaiteki/routing/notifier.dart:16:43)
#138    ProviderElementBase.watch (package:riverpod/src/framework/element.dart:713:12)
#139    routerProvider.<anonymous closure> (package:kaiteki/routing/router.dart:47:23)
#140    ProviderContainer.listen (package:riverpod/src/framework/container.dart:285:21)
#141    ConsumerStatefulElement.watch.<anonymous closure> (package:flutter_riverpod/src/consumer.dart:560:25)
#142    _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:535:23)
#143    ConsumerStatefulElement.watch (package:flutter_riverpod/src/consumer.dart:553:26)
#144    KaitekiApp.build (package:kaiteki/app.dart:27:24)
#145    _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:479:19)
#146    StatefulElement.build (package:flutter/src/widgets/framework.dart:5410:27)
#147    ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:542:20)
#148    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5298:15)
#149    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5463:11)
#150    Element.rebuild (package:flutter/src/widgets/framework.dart:5017:7)
#151    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5280:5)
#152    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5454:11)
#153    ComponentElement.mount (package:flutter/src/widgets/framework.dart:5274:5)
...     Normal element mounting (7 frames)
#160    _UncontrolledProviderScopeElement.mount (package:flutter_riverpod/src/framework.dart:309:11)
...     Normal element mounting (35 frames)
#195    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4183:16)
#196    Element.updateChild (package:flutter/src/widgets/framework.dart:3708:18)
#197    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#198    RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1222:5)
#199    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1169:18)
#200    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2720:19)
#201    RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1168:13)
#202    WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1001:7)
#203    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:981:7)
#207    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 9 frames from class _Timer and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════

whether this is more or less useful, i don't know :p

i guess it has something to do with the change in material_color_utilities, but i have never used flutter and don't know anything about how to debug this beyond what i can find by searching

SputNikPlop commented 1 year ago

@nullobsi @EzioisAwesome56 May you guys try again now I believe it should be fixed

SputNikPlop commented 1 year ago

@Craftplacer This issue may be closed works now

Screenshot 2023-09-17 at 16 40 46