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
Does not work on flutter master #40
Comments
My suspicion is that something in Dart-land has changed such that the |
Strange, because screenshots also calls BTW: the dev branch has several bug fixes and new features. You might want to try it:
|
Just getting a different error trying that ("No devices detected"). I'd like to dig in and debug, but struggling to figure out how to do so. I set up a launch configuration like this:
But this gives me an error when attempting to launch:
The culprit is the Any ideas? |
I'm not familiar with this launch configuration. Where does it come from? Why are you on the flutter master channel? Are you using a new flutter feature that has not been released yet? The flutter master channel is notorious for constantly changing (it's where all the latest code is checked-in before it goes to the beta channel and then to the stable channel). It's a lot more reliable to use the stable channel... that's where you would find most of the support for third-party tools... like screenshots. |
Sorry, I didn't provide sufficient context. I am trying to get my app to the app stores (hence, using The configuration I showed is a VS Code launch configuration. i.e. it tells VS Code what to do when you run or debug the program. In my case, I was trying to tell it to run in the context (working directory) of my actual app so that it reproduced the problem I was experiencing when running Maybe I'm better off waiting for the fix to land in |
screenshots currently does not have a verbose logging feature (looks like there may be a need to add one). You can try to uncomment some of the print statements and add your own and maybe also add verbose options where screenshots makes calls to run a command (for example Assuming you are running screenshots locally, and if you intend to run screenshots in a CI/CD environment, or in general, there should be no requirement to launch from an IDE like VSCode or Android Studio. From your log above, I notice that the method for forwarding the VM_SERVICE_URL now includes a random key (http://127.0.0.1:32813/bp9xbtUc2jc=/) with possibly unescaped characters which may be getting interpreted somewhere (possibly the dart interpreter, or the shell the process is running in). I tried running tests with the example app on the master channel and I got the same problem: $ screenshots
I will look into this as I am under the impression the new VM_SERVICE_URL format is a legit new thing that will make it into the stable channel. BTW: If screenshots runs locally with your app in the stable channel, you can always upload the images manually to both stores instead of running it in codemagic. BTW2: you mention you where able to work around the screenshots breakage. Was this on the master channel? |
I ran the test on the example app in the master channel and, even though the test passed, I got a ton of RPC errors:
$ flutter drive test_driver/main.dart
This may be related to why screenshots is not running in the master channel. Are you getting the same result for the example app? |
OK, I've identified and solved the problem. I will PR later today. Meanwhile, some more detail and follow-ups are below.
The workaround I alluded to is to run
My intention was to debug the problems I've mentioned (getting stuck on Indeed, I found a workaround for this. I created a launch configuration like this: {
"name": "Dart",
"program": "/Users/kent/Repository/screenshots/bin/main.dart",
"request": "launch",
"type": "dart",
"cwd": "/Users/kent/Repository/screenshots/example"
} In other words, when setting
Yeah, more or less. It starts up the Android emulator then hangs. Here's the output:
Again, just looks like it hasn't realized that the application is running and can start driving.
So given that I figured out how to debug, I took a closer look and found the culprit. As I mentioned in this earlier comment, it is due to Again, I'll PR a fix shortly. The only mystery for me is why you were able to generate screenshots from the example app when using |
Great! There was a problem with the stderr not streaming at the right time. Glad you were able to find it.
Even if you don't need the frame, the raw image will not include the overlaid status bar or, for android, the appended navigation bar (so for android it is not the correct length). This is one of the driving reasons I created screenshots. In your first comment you mention:
and in your most recent comment:
I assume in both cases you are using 'flutter drive'. It's not clear if you are using the example app or your own app. I usually try confirm the example app is running for you before getting into specifics of your app. Anyway, looks like you have solved it. BTW: there may still be a build problem on travis. If there is I will try to fix it before merging PR. Thnx! |
BTW: as mentioned in #38 (comment), if you are relying on screenshots running in the cloud to generate the correct images, you are going to have to setup the correct hardware profile for each device (like Android Studio does). |
Released v0.4.0
Hi,
screenshots does not work against
master
, even thoughflutter drive
does. The output I'm getting is:And there is just hangs. It does the same thing if I disable Android and just use iOS.
The text was updated successfully, but these errors were encountered: