jhomlala / catcher

Flutter error catching & handling plugin. Handles and reports exceptions in your app!
Apache License 2.0
784 stars 175 forks source link

[BUG] Missing CMakeLists.txt on windows #236

Closed toheiss-btc closed 10 months ago

toheiss-btc commented 1 year ago

Describe the bug Hi all, after adding Catcher to my project, I get an error message about the source directory not containing the CMakeLists.txt file.

To Reproduce Steps to reproduce the behavior:

  1. Added catcher as a dep.
  2. Tried to run the project

Expected behavior The project to run.

Screenshots image

Flutter doctor • No issues found!

Catcher version

Smartphone (please complete the following information):

mrclauss commented 1 year ago

Same here. The CMakeLists.txt file is present in the github repository, but when the package is fetched by "pub get" the local .pub-cache folder does not contain it. Seems to be missing in the tgz file downloaded from pub.dev:

Output from: flutter pub get -v [ ] IO : Reading binary file F:\temp\pub_979fdb0f\catcher-0.7.0.tar.gz. [ ] FINE: Extracting .tar.gz stream to e:\Programme\flutter.pub-cache_temp\dir3bc5d607. [ +14 ms] IO : Creating e:\Programme\flutter.pub-cache_temp\dir3bc5d607\windows\include\catcher\catcher_plugin.h from stream. [ +2 ms] FINE: Created e:\Programme\flutter.pub-cache_temp\dir3bc5d607\windows\include\catcher\catcher_plugin.h from stream. [ ] IO : Creating e:\Programme\flutter.pub-cache_temp\dir3bc5d607\windows\catcher_plugin.cpp from stream. [ ] FINE: Created e:\Programme\flutter.pub-cache_temp\dir3bc5d607\windows\catcher_plugin.cpp from stream.

That's all for windows...

bmcclure commented 1 year ago

Agreed. I initially realized I was using catcher 0.5.0, which did have a cmakelists.txt file, but after I updated to 0.7.0, the file disappeared.

Note: Manually copying the file from the master branch to the cached directory seems to fix the issue... as long as next time it updates the file is included.

narumi147 commented 1 year ago

The platform codes are added just to display all platform support on pub.dev, except that, the platform codes are useless. I have already told the problem and solution several times, but I cannot understand why the author keeps ignoring my advice. I create a folk to remove all platform codes.

the fork with some fixes:

calcitem commented 1 year ago

A similar problem will also occur with a fresh compilation under Linux:

[ +139 ms] CMake Error at flutter/generated_plugins.cmake:18 (add_subdirectory):
[        ]   The source directory
[        ]     /root/parts/mill/build/src/ui/flutter_app/linux/flutter/ephemeral/.plugin_symlinks/catcher/linux
[        ]   does not contain a CMakeLists.txt file.
[        ] Call Stack (most recent call first):
[        ]   CMakeLists.txt:144 (include)
[  +10 ms] -- Configuring incomplete, errors occurred!
kevinxxq commented 1 year ago

The platform codes are added just to display all platform support on pub.dev, except that, the platform codes are useless. I have already told the problem and solution several times, but I cannot understand why the author keeps ignoring my advice. I create a folk to remove all platform codes.

the fork with some fixes:

Hi, Thank you for your fork, I have a question, will your fork still generate a catcher_pulgin.dll on windows?

I tried today and found no such dll file and the App crashed but the issue is still not confirmed since I updated the sdk to 3.10.0 too.

Thank you.

narumi147 commented 1 year ago

@kevinxxq the folk won't generate dynamic library file for this plugin. I works fined in my project.(flutter stable 3.7.11)

Since 3.10 released, I updated some dependencies. It works fine now on my macOS with flutter 3.10. You can try again with the latest commit.

Run in verbose mode flutter run -v to get more details to help you figure out what's wrong. Many dependencies didn't get updated to be compatible with dart 3 or flutter 3.10. If you still have problem, I think you could paste some log/code to let others help you figure it out.

kevinxxq commented 1 year ago

Hi @narumi147 Thank you for reply and quick action, just as you said, I rolled back to flutter sdk 3.7.12 since too many dependencies need be taken care of. It works well with original 0.6.9.

It is great to reduce one dll for release, too many files need be signed and copied on windows...

I will try your fork when flutter sdk 3.10 is "stable" enough. Thank you again.

jonas-martinez commented 1 year ago

Hi ! I'm still experiencing this issue. Did anyone plan to fix this bug ? I can help to bring the changes if someone already identified what has to be done. Thanks ! :smile:

narumi147 commented 1 year ago

The platform codes are added just to display all platform support on pub.dev, except that, the platform codes are useless. I have already told the problem and solution several times, but I cannot understand why the author keeps ignoring my advice. I create a folk to remove all platform codes.

the fork with some fixes:

@jonas-martinez try this folk

jonas-martinez commented 1 year ago

@narumi147 You fork has fixed the issue :smile:. Thank you for your work!

It would still be better if these changes were done on @jhomlala's project, why can't it be done?

mrclauss commented 1 year ago

Because it seems he doesn't maintain/work on that thing any more. Please consider raising a PR to this fork which already contains fixes for lots of other issues: https://github.com/ThexXTURBOXx/catcher

jhomlala commented 10 months ago

Please update to version 0.8.0.