GithubHelp home page GithubHelp logo

Comments (32)

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024 1

Context has nothing to do with it. This package also requires context to push the notification.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024 1

See issue

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Hi @orangewp
Can you paste your code here, please?

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

hii after a lot of trying, I decided not to use the plugin in my app. Maybe I can reuse it to create the issue.

basically what I am doing is,

Popping up flushbar whenever app gets OnMessage() FCM notification.

in android I didnt notice any issue because of the back button but in IOS the swipe from left edge to right edge (which is common to go back) crashes the app.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Sorry to hear that @orangewp
Unfortunately, I can not debug it on IOS since I do not own a MAC (it is too expensive in Brazil).
I will try to borrow one, but for now, I welcome PRs with possible solutions.

Do not know if this helps, but Flushbar pushes a route on top of the stack. Try dismissing Flushbar before going back.

In any case, thanks for your interest.

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

I really like your plugin. even if I am unable to use it.
the thing is the main stateful widget is pushing the flushbar popup, I cannot control it when I am deep down to another stateful widget.

I am not expert in the flutter/dart.

from flushbar.

VadymPinchuk avatar VadymPinchuk commented on July 21, 2024

Actually same issue is on Android ) so it can be checked. please take a look on that.
E/flutter (30885): 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1554 pos 12: '!_debugLocked': is not true. E/flutter (30885): #0 _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:40:39) E/flutter (30885): #1 _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:36:5) E/flutter (30885): #2 NavigatorState.push (package:flutter/src/widgets/navigator.dart:1554:12) E/flutter (30885): #3 Flushbar.show (package:flushbar/flushbar.dart:383:62) E/flutter (30885): <asynchronous suspension> E/flutter (30885): #4 HomePage.build.<anonymous closure> (package:flutter_flushbar/main.dart:97:23) E/flutter (30885): #5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14) E/flutter (30885): #6 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:562:30) E/flutter (30885): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24) E/flutter (30885): #8 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9) E/flutter (30885): #9 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:175:7) E/flutter (30885): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:315:9) E/flutter (30885): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12) E/flutter (30885): #12 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11) E/flutter (30885): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:180:19) E/flutter (30885): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:158:22) E/flutter (30885): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:138:7) E/flutter (30885): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7) E/flutter (30885): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7) E/flutter (30885): #18 _invoke1 (dart:ui/hooks.dart:168:13) E/flutter (30885): #19 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5)

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

@I-am-original Thanks for reporting. Could you paste relevant code, please? Or share a link to your code. This could help me reproduce the error

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

No need. I was able to reproduce it. Working on the solution.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

@I-am-original version 1.1.1 was released. Please, let me know if the problem was solved.

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

did it fixed my issue as well?

from flushbar.

VadymPinchuk avatar VadymPinchuk commented on July 21, 2024

@AndreHaueisen yes I have seen that. But have not checked. @orangewp it should fix issue with Navigator. Actually there where only one crash )

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

this is the error I am getting on ios when swiping.

flutter: ══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown while notifying status listeners for AnimationController:
flutter: Cannot reuse a MaterialPageRoute after disposing it.
flutter: 'package:flutter/src/widgets/routes.dart': Failed assertion: line 218 pos 12:
flutter: '!_transitionCompleter.isCompleted'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 TransitionRoute.didPopNext (package:flutter/src/widgets/routes.dart:218:12)
flutter: #3 NavigatorState.pop (package:flutter/src/widgets/navigator.dart:1792:23)
flutter: #4 _CupertinoBackGestureController._handleStatusChanged (package:flutter/src/cupertino/route.dart:610:17)
flutter: #5 _AnimationController&Animation&AnimationEagerListenerMixin&AnimationLocalListenersMixin&AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:161:19)
flutter: #6 AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:678:7)
flutter: #7 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:694:5)
flutter: #8 Ticker._tick (package:flutter/src/scheduler/ticker.dart:228:5)
flutter: #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame. (package:flutter/src/scheduler/binding.dart:906:11)
flutter: #11 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:370:8)
flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
flutter: #14 _invoke1 (dart:ui/hooks.dart:153:13)
flutter: #15 _beginFrame (dart:ui/hooks.dart:123:3)
flutter: (elided 2 frames from class _AssertionError)
flutter:
flutter: The AnimationController notifying status listeners was:
flutter: AnimationController#8a450(⏮ 0.000; paused; DISPOSED; for MaterialPageRoute(null))
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

the the widget showing the flushbar is stacked and I am in deep down widget.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

This error happens when you try to reuse a dismissed Flushbar. An instance can be used only one time.
That being said, it is hard for me to diagnose the problem without the code.
@orangewp , it looks like you and @I-am-original are having different problems after all.

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

it is happenning when I am popping back but after duration ends it tried to close the flushbar

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

lets say i set duration 10 seconds and I pop back after flushbar shows.
when 10 seconds ends, it throws error.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Ohh that helps a lot. The timer is not getting properly canceled. Thanks! I will try to solve it asap

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

sorry I was thinking more and I realised that you also set flushbar in a way that it automatically gets dismissed when navigator push or pop..
so
when push, it is working as expected but in pop, it is throwing the error because it might be trying to dismiss the flush after popping up

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

I double checked. Timer has nothing to do. The pop is throwing the error immediately.

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

only when popping by swiping in ios. If we press the back button in ios it is closing the flush on first tab and popping on second tap. means if flush is showing, then it takes two back button taps to go back. but in ios people usually use swipe to go back.

from flushbar.

orangepreneur avatar orangepreneur commented on July 21, 2024

this is my observation. I hope it helps :)

from flushbar.

joaorpalma avatar joaorpalma commented on July 21, 2024

I'm having the same issue, any fix for this?

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

@joaowd I had to buy a MAC to test my apps (hate Apple expensive products)
Will begin debugging it as soon as it arrives.

from flushbar.

joaorpalma avatar joaorpalma commented on July 21, 2024

@joaowd I had to buy a MAC to test my apps (hate Apple expensive products)
Will begin debugging it as soon as it arrives.

Thats great news, they are expensive but they are really good, you will love it :)

(I'm getting this exception on the both branches I tested (dev and master))

Exception Message:

flutter: ══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown while notifying status listeners for AnimationController:
flutter: Cannot reuse a MaterialPageRoute<dynamic> after disposing it.
flutter: 'package:flutter/src/widgets/routes.dart': Failed assertion: line 218 pos 12:
flutter: '!_transitionCompleter.isCompleted'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      TransitionRoute.didPopNext 
package:flutter/…/widgets/routes.dart:218
flutter: #3      NavigatorState.pop 
package:flutter/…/widgets/navigator.dart:1833
flutter: #4      _CupertinoBackGestureController._handleStatusChanged 
package:flutter/…/cupertino/route.dart:653
flutter: #5      _AnimationController&Animation&AnimationEagerListenerMixin&AnimationLocalListenersMixin&AnimationLocalStatusListenersMixin.notifyStatusListeners 
package:flutter/…/animation/listener_helpers.dart:192
flutter: #6      AnimationController._checkStatusChanged 
package:flutter/…/animation/animation_controller.dart:736
flutter: #7      AnimationController._tick 
package:flutter/…/animation/animation_controller.dart:752
flutter: #8      Ticker._tick 
package:flutter/…/scheduler/ticker.dart:228
flutter: #9      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback 
package:flutter/…/scheduler/binding.dart:990
flutter: #10     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure> 
package:flutter/…/scheduler/binding.dart:906
flutter: #11     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
flutter: #12     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame 
package:flutter/…/scheduler/binding.dart:904
flutter: #13     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame 
package:flutter/…/scheduler/binding.dart:834
flutter: #17     _invoke1 (dart:ui/hooks.dart:203:10)
flutter: #18     _beginFrame (dart:ui/hooks.dart:156:3)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: The AnimationController notifying status listeners was:
flutter:   AnimationController#1b6d1(⏮ 0.000; paused; DISPOSED; for MaterialPageRoute<dynamic>(null))

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Trying to find a solution with the flutter team

from flushbar.

joaorpalma avatar joaorpalma commented on July 21, 2024

Since you use context to pop the bar, I don't think there is a solution.

I'm using this package https://pub.dartlang.org/packages/overlay_support

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Just released a new feature that offers a temporary workaround. Use FlushbarPosition.TOP with FlushbarStyle.GROUNDED so the user will have to dismiss the notification first before being able to do the "swipe to go back" gesture

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

This issue was fixed on Flutter master channel.
To use it, type the command in the terminal flutter channel master.
This should eventually come to the stable channel.

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

Leaving it open while this does not hit stable to inform new users.

from flushbar.

ricpar11 avatar ricpar11 commented on July 21, 2024

It's a shame that this issue has not been solved yet, I love this library but this forces me to look for alternatives 😭

from flushbar.

AndreHaueisen avatar AndreHaueisen commented on July 21, 2024

This issue was moved to
#104

from flushbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.