Bloc: BlocSupervisor.delegate not printing anything to the console

Created on 23 Oct 2019  Β·  10Comments  Β·  Source: felangel/bloc

Describe the bug
For some reason the SimpleBlocDelegate is not printing anything to the console. I haven't changed anything from my codebase and my BlocDelegate is exactly as SimpleBlocDelegate from docs.
It just suddenly stopped printing out to the console.

To Reproduce
Steps to reproduce the behavior:
Regular program with BlocSupervisor.delegate = SimpleBlocDelegate(); set in main method.

Expected behavior
When any event is triggered, it should print out to the console.

*Logs *
Run flutter analyze and attach any output of that command below.

No issues found! (ran in 5.1s)

Paste the output of running flutter doctor -v here.

[βœ“] Flutter (Channel dev, v1.10.14, on Mac OS X 10.15 19A602, locale en-US)
    β€’ Flutter version 1.10.14 at /Users/tapizquent/Projects/tools/flutter
    β€’ Framework revision 1946fc4da0 (2 weeks ago), 2019-10-07 15:23:31 -0700
    β€’ Engine revision 1d62160fdb
    β€’ Dart version 2.6.0 (build 2.6.0-dev.1.0 d6c6d12ebf)


[βœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    β€’ Android SDK at /Users/tapizquent/Library/Android/sdk
    β€’ Android NDK location not configured (optional; useful for native profiling support)
    β€’ Platform android-29, build-tools 29.0.0
    β€’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    β€’ All Android licenses accepted.

[βœ“] Xcode - develop for iOS and macOS (Xcode 11.1)
    β€’ Xcode at /Applications/Xcode.app/Contents/Developer
    β€’ Xcode 11.1, Build version 11A1027
    β€’ CocoaPods version 1.8.4

[βœ“] Android Studio (version 3.4)
    β€’ Android Studio at /Applications/Android Studio.app/Contents
    β€’ Flutter plugin version 36.1.1
    β€’ Dart plugin version 183.6270
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[βœ“] VS Code (version 1.39.2)
    β€’ VS Code at /Applications/Visual Studio Code.app/Contents
    β€’ Flutter extension version 3.5.1

[βœ“] Connected device (1 available)
    β€’ iPhone β€’ e75fc710ec1404ac1c323311b0ba25049db7e7d4 β€’ ios β€’ iOS 13.1.3

β€’ No issues found!

Additional context
No idea why is stopped printing out. Nothing prints. No events, no transitions, it's like it doesn't even have a BlocDelegate.

question

Most helpful comment

You are totally right. No other print statement is working either.

Apparently the Flutter team is aware of this: https://github.com/flutter/flutter/issues/41133

I guess it is okay to close now. I will have to use Simulator for logging meanwhile.

Thank you!

All 10 comments

Hi. Can you provide some example, on GitHub for example, so we can investigate further and not guess? :)

Hi @tapizquent πŸ‘‹
Thanks for opening an issue!

As @tenhobi mentioned, it would be most helpful if you can provide a link to a sample app which illustrates the problem. Thanks!

I am trying to get a working demo to show the behavior but when creating a new app it seems to work fine. I don't want to make you look through all of my app to identify what could be causing this. I will try to reproduce the problem. Last resort, I will give you access to the repo for the app. It's mostly organized and shouldn't be that bad too identify where blocs are, etc.

Sounds good! I don't mind taking a look at your app if you're okay with that. It probably wouldn't take too long to debug the issue πŸ‘

Ok, so update. I did run some tests and figured out that it works when we run it in the simulator but not when running it on my device. iOS Simulator works fine but iOS device does not print anything.

I have made you @felangel a collaborator to the repo so you can take a look.

Latest branch you should look at: feature/pet_creation/#231ga302_allow_user_to_view_pets

SimpleBlocDelegate is right on the /lib/ folder and all other Blocs are within subfolder but clearly named Bloc

Where are you looking for the prints? Are others showing up when you run on a real device? Are you running in debug or release mode?

I run app through VSCode and usually just hit 'Start Without Debugging' or ^F5. Running the same way, it runs fine in simulator. I run in debug mode not release nor profile.

I am looking for prints in the VSCode Debug Console, where they appear when running in simulator

Running 'Start With Debugging' does not show printing either

That’s strange do other prints show up?

You are totally right. No other print statement is working either.

Apparently the Flutter team is aware of this: https://github.com/flutter/flutter/issues/41133

I guess it is okay to close now. I will have to use Simulator for logging meanwhile.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tigranhov picture tigranhov  Β·  3Comments

abinvp picture abinvp  Β·  3Comments

wheel1992 picture wheel1992  Β·  3Comments

rsnider19 picture rsnider19  Β·  3Comments

hivesey picture hivesey  Β·  3Comments