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

"Bad state: No Element" in "Species Card" widget #145

Open
adzialocha opened this issue Jun 5, 2024 · 0 comments
Open

"Bad state: No Element" in "Species Card" widget #145

adzialocha opened this issue Jun 5, 2024 · 0 comments
Labels
bug Something isn't working UI / UX User interface improvements

Comments

@adzialocha
Copy link
Member

======== Exception caught by widgets library =======================================================
The following StateError was thrown building QueryOnClient<Object?>(dirty, useMemoized<WatchQueryOptions<Object?>>: Instance of 'WatchQueryOptions<Object?>', useMemoized<WatchQueryOptions<Object?>>: Instance of 'WatchQueryOptions<Object?>', Instance of 'ObservableQuery<Object?>', useStream: AsyncSnapshot<QueryResult<Object?>>(ConnectionState.active, QueryResult(source: QueryResultSource.network, data: {__typename: Query, collection: {__typename: bee_sighting_0020df662f01bd4eed879ebb2128edd3e0b55902f179eeaf8978e58011f96b488717Collection, documents: [{__typename: bee_sighting_0020df662f01bd4eed879ebb2128edd3e0b55902f179eeaf8978e58011f96b488717Item, meta: {__typename: DocumentMeta, owner: 7043432b246bbee866c9e122a1acb3de71164a1ba0981be7ed9a44d306df6e6e, documentId: 0020451523da76f9d7c0c7270fd35eff6afd7e6e0ef99c43c0a6e0e90c4c18b1670e, viewId: 0020992077b723e5e4e1b7f447c669cc22f53bd92dd1d361a3ffca49a130872e8e27}, fields: {__typename: bee_sighting_0020df662f01bd4eed879ebb2128edd3e0b55902f179eeaf8978e58011f96b488717Fields, datetime: 2024-06-05T12:48:11.953361, latitude: 0.0, longitude: 0.0, comment: , images: {__typename: blob_v1Collection, documents: []}, species: {__typename: bee_species_00207889f44a73c94bb9f7e7d087e47d87ab4854c3693bca35bf16c596c8c91c5fe7Collection, documents: [{__typename: bee_species_00207889f44a73c94bb9f7e7d087e47d87ab4854c3693bca35bf16c596c8c91c5fe7Item, meta: {__typename: DocumentMeta, owner: 7043432b246bbee866c9e122a1acb3de71164a1ba0981be7ed9a44d306df6e6e, documentId: 00200220bfba9d47ab8a233468348f12ebcd442ca69586ea0892030569ebed5be5d1, viewId: 00200220bfba9d47ab8a233468348f12ebcd442ca69586ea0892030569ebed5be5d1}, fields: {__typename: bee_species_00207889f44a73c94bb9f7e7d087e47d87ab4854c3693bca35bf16c596c8c91c5fe7Fields, description: , species: {__typename: taxonomy_species_0020e1567cb6f7e097b449cd05174f96ac17f774d8b80ffea423c4d4b386e423cb0a, meta: {__typename: DocumentMeta, owner: 7043432b246bbee866c9e122a1acb3de71164a1ba0981be7ed9a44d306df6e6e, documentId: 002015020dbf027fdc63f6d819608acb899287c239e8e09d29f3ae7d9a28554311cc, viewId: 002015020dbf027fdc63f6d819608acb899287c239e8e09d29f3ae7d9a28554311cc}, fields: {__typename: taxonomy_species_0020e1567cb6f7e097b449cd05174f96ac17f774d8b80ffea423c4d4b386e423cb0aFields, name: moomin}}}}]}, local_names: {__typename: bee_local_name_0020aeaca910c8a3f5fb0f80f7e8e6878720272d3bdcefa45c97cfc627e3b5e4252cCollection, documents: []}}}]}}, context: Context({ResponseExtensions: Instance of 'ResponseExtensions', HttpLinkResponseContext: Instance of 'HttpLinkResponseContext'}), exception: null, timestamp: 2024-06-05 12:54:17.357205), null, null), useEffect):
Bad state: No element

The relevant error-causing widget was: 
  Query<Object?> Query:file:///home/adz/dev/p2panda/meli/packages/app/lib/ui/widgets/species_card.dart:46:12
When the exception was thrown, this was the stack: 
#0      List.first (dart:core-patch/growable_array.dart:343:5)
#1      _SpeciesCardState._image.<anonymous closure> (package:app/ui/widgets/species_card.dart:65:51)
#2      QueryOnClient.build (package:graphql_flutter/src/widgets/query.dart:53:19)
#3      StatelessElement.build (package:flutter/src/widgets/framework.dart:5557:49)
#4      HookElement.build (package:flutter_hooks/src/framework.dart:438:27)
#5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5487:15)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:5203:7)
#7      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2905:19)
#8      WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1136:21)
#9      RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:443:5)
#10     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1392:15)
#11     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1313:9)
#12     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1171:5)
#13     _invoke (dart:ui/hooks.dart:312:13)
#14     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#15     _drawFrame (dart:ui/hooks.dart:283:31)

Screenshot_20240605_125434

@adzialocha adzialocha added the bug Something isn't working label Jun 5, 2024
@adzialocha adzialocha changed the title Bad state: No Element in "Species Card" widget "Bad state: No Element" in "Species Card" widget Jun 5, 2024
@adzialocha adzialocha added the UI / UX User interface improvements label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI / UX User interface improvements
Projects
None yet
Development

No branches or pull requests

1 participant