-
Notifications
You must be signed in to change notification settings - Fork 315
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
ort with flutter - several issues #6269
Comments
Maybe @MarcelBochtler can help (but he's already on vacation, so may be slow to respond 😉). |
PS: Please don't post screenshots of logs / console output as they're not searchable. Just copy & paste the text instead. |
== FIRST DOCKER SETUP == docker build -t ort . docker run -v $PWD/:/fla ort:latest --info analyze -f JSON -i /fla/news_async_redux -o /fla/ort/analyze --- RESULT --- 16:36:01,030 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.5 16:36:01.311 [main] INFO org.ossreviewtoolkit.utils.common.EnvironmentVariableFilter - EnvironmentVariableFilter initialized with denySubstrings = [key, pass, pwd, token, user] and allowNames = [CARGO_HTTP_USER_AGENT, COMPOSER_ALLOW_SUPERUSER, CONAN_LOGIN_ENCRYPTION_KEY, CONAN_LOGIN_USERNAME, CONAN_PASSWORD, CONAN_USERNAME, CONAN_USER_HOME, CONAN_USER_HOME_SHORT, DOTNET_CLI_CONTEXT_ANSI_PASS_THRU, GIT_ASKPASS, GIT_HTTP_USER_AGENT, GRADLE_USER_HOME, HACKAGE_USERNAME, HACKAGE_PASSWORD, HACKAGE_KEY, PWD, USER, USERPROFILE]. / _______ __ / The OSS Review Toolkit, version DOCKER-SNAPSHOT. Environment variables: Looking for ORT configuration in the following file: Looking for analyzer-specific configuration in the following files and directories: 16:36:14.600 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which path_provider_ios --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:15.001 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which shared_preferences_ios --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:15.438 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3_flutter_libs --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:15.845 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3 --version=3.39.3 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:23.284 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which video_player_avfoundation --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:23.693 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which wakelock --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:24.160 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which webview_flutter_wkwebview --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:36:24.995 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.analyzer.PackageManager - Resolving CocoaPods dependencies for path 'ios/Podfile' took 15.138278673s. 16:36:27.648 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which path_provider_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:36:28.105 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which shared_preferences_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:36:28.512 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3_flutter_libs --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:36:28.920 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3 --version=3.39.2 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:36:29.756 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which wakelock_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:36:30.269 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.analyzer.PackageManager - Resolving CocoaPods dependencies for path 'macos/Podfile' took 5.273653336s.
|
== SECOND DOCKER SETUP == docker build --platform linux/x86_64 -t ort_x86_64 . docker run --platform linux/x86_64 -v $PWD/:/fla ort_x86_64:latest --info analyze -f JSON -i /fla/news_async_redux -o /fla/ort/analyze OR docker run -v $PWD/:/fla ort_x86_64:latest --info analyze -f JSON -i /fla/news_async_redux -o /fla/ort/analyze --- RESULT --- 16:42:32,708 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.5 16:42:35.696 [main] INFO org.ossreviewtoolkit.utils.common.EnvironmentVariableFilter - EnvironmentVariableFilter initialized with denySubstrings = [key, pass, pwd, token, user] and allowNames = [CARGO_HTTP_USER_AGENT, COMPOSER_ALLOW_SUPERUSER, CONAN_LOGIN_ENCRYPTION_KEY, CONAN_LOGIN_USERNAME, CONAN_PASSWORD, CONAN_USERNAME, CONAN_USER_HOME, CONAN_USER_HOME_SHORT, DOTNET_CLI_CONTEXT_ANSI_PASS_THRU, GIT_ASKPASS, GIT_HTTP_USER_AGENT, GRADLE_USER_HOME, HACKAGE_USERNAME, HACKAGE_PASSWORD, HACKAGE_KEY, PWD, USER, USERPROFILE]. / _______ __ / The OSS Review Toolkit, version DOCKER-SNAPSHOT. Environment variables: Looking for ORT configuration in the following file: Looking for analyzer-specific configuration in the following files and directories: 16:43:17.118 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which path_provider_ios --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:21.202 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which shared_preferences_ios --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:26.299 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3_flutter_libs --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:30.582 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3 --version=3.39.3 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:44.220 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which video_player_avfoundation --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:48.048 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which wakelock --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:51.696 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which webview_flutter_wkwebview --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/ios'... 16:43:57.660 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.analyzer.PackageManager - Resolving CocoaPods dependencies for path 'ios/Podfile' took 59.590896401s. 16:44:09.249 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which path_provider_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:44:13.028 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which shared_preferences_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:44:16.698 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3_flutter_libs --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:44:20.512 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which sqlite3 --version=3.39.2 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:44:28.329 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which wakelock_macos --version=0.0.1 --allow-root --regex' in '/fla/news_async_redux/macos'... 16:44:32.153 [DefaultDispatcher-worker-3] INFO org.ossreviewtoolkit.analyzer.PackageManager - Resolving CocoaPods dependencies for path 'macos/Podfile' took 34.489390308s. ===== CRASH =====
|
I tried to reproduce this on my M1 Macbook, with a synthetic test project. The first thing I tried is to analyze this project using ORT without Docker and with Flutter installed via Homebrew. However, I can reproduce your issue when building the Docker image using I think we cannot do much about this, other than waiting for a better Rosetta 2 emulation when using Docker, as there is no As a workaround, I'd suggest to build ORT natively, install Flutter using Homebrew and produce the analyzer result without Docker. One additional thing I noticed, Flutter will not be bootstrapped on macOS at all: ort/analyzer/src/main/kotlin/managers/Pub.kt Lines 149 to 153 in d4ca1b5
I created an issue for that: #6272 |
Thank you very much Marcel! Now I have installed ORT form the sources with gradle build and it works - basically.
but I think the analyzer cannot access via ssh. But I have to look into it further. That's the error:
|
When cloning over ssh://, Git always needs to authenticate (there is no unauthenticated way to clone over ssh://). So either set up SSH authentication on the machine running ORT, e.g. via ssh-agent, or change the URL to https:// to clone over https:// unauthenticated (if the host supports that). |
Maybe that's a misunderstanding - or I didn't quite understand what I have to do exactly. I have already configured SSH locally and also pulled the ORT project over SSH (successfully). My problem is that in the flutter pubspec.yaml a dependency is drawn via GIT-SSH. This is currently failing. |
So, is |
Yes, it's a private repository. If I call Does ORT support the resolving of unpublished packages? |
Not sure if it's related, but there might be issues. Maybe @MarcelBochtler or @fviernau can tell. |
I have switched to an other flutter project to evaluate ORT for our flutter projects. Now I'm struggling with the configuration and the possibilities using with Flutter.
For example I enhanced the analyzer part at "enabledPackageManagers" with "Pub" - and it seems to work.
For example, in Flutter a good package is a "Flutter Favorite" with a lot likes, pub points and popularity - and additionally it should have a verified publisher. All of this I can see in pub.dev - some examples: If I look in my analyzer result I see for example this for the package "logging"
On Pub.dev https://pub.dev/packages/logging you can see the package is under BSD-3 License, but there is no license information in the result (see above). It seems that there is no data from Pub.dev at all. Have I missed something in the configuration or is there no support for this kind of information in ORT? Thanks a lot! |
You best bet is https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/resources/reference.yml.
These are usually documented as part of the class: ort/analyzer/src/main/kotlin/managers/Pub.kt Lines 89 to 95 in babdd12
As you can see, there are no special options supported for Pub. Compare e.g. with ort/analyzer/src/main/kotlin/managers/Yarn2.kt Lines 84 to 91 in babdd12
Put simply, none. As this is a Pub-specific feature, ORT's common data model for packages does not reflect this.
There's a hint in the code: ort/analyzer/src/main/kotlin/managers/Pub.kt Lines 447 to 448 in babdd12
So basically, what you see at https://pub.dev/packages/logging/license is what ORT would detect during the scan phase. It's not a declared license (in ORT speak) that would be discovered during analysis already. But in the end, I'm no Pub expert. Maybe https://pub.dev/ offers some kind of API that would also allow to query the license of a package, but so far I didn't find such an API. |
Thank you, that helps a lot. It is a pity that the meta data from pub.dev cannot be used. I was hoping ORT would support that. I know, of course, that Flutter is "exotic" and that the other tools can't do it any better, but I don't know if it's "worth" using ORT for Flutter. I'll take a look at the scan result. It's been running for hours. :) |
Now I found it, see https://pub.dev/help/api and https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md. However, the JSON response e.g. for https://pub.dev/api/packages/logging also does not list any license metadata. There's already an issue for that, see dart-lang/pub-dev#4717. |
BTW, I feel that we could consider gathering likes, Pub Points, and popularity as part of #3317. |
This would be very nice. I just tried to dig a little bit deeper in the infos I get from ORT and created a sample Flutter Project just with the "Logger", but it fails at anaylze. I have opened an issue for that #6457 |
I'm closing the issue as the discussion has digressed quite a bit into a bunch of other issues here and there, making it very hard to catch up with what the actual issue to solve is. Please create individual follow-up issues (one for each different issue) if parts of the problem are still reproducible, and describe the necessary steps to do so. |
Hi,
I'm trying to set up ort for Flutter - but unfortunately the analyze keeps crashing.
I'll be honest, I have only rudimentary Docker knowledge - and I have a Mac Pro with an Apple M1 chip.
First I tried the docker installation written in the readme "docker build -t ort .". The build was quick and went well.
The analyze of a sample Flutter project stops with this:
After some researches with Google I found the hint to build with "docker build --platform linux/x86_64 -t ort ." when Apple M1 chip. The build takes hours...
The analyze of the same Flutter project crashes:
I have no clue how to fix this. Can somebody help me?
Is there anybody who is using already ort with Flutter?
Thanks
Ivonne
The text was updated successfully, but these errors were encountered: