Skip to content
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

Null pointer when starting emulator for mac devices #2

Closed
frickt opened this issue Feb 3, 2019 · 2 comments
Closed

Null pointer when starting emulator for mac devices #2

frickt opened this issue Feb 3, 2019 · 2 comments
Labels
bug Something isn't working resolved Issue is considered resolved

Comments

@frickt
Copy link

frickt commented Feb 3, 2019

unable to start emulator for mac devices, simulatorInfo is null:

$ screenshots
Starting emulator: Nexus_5X ...
Capturing screenshots with test test_driver/full_app.dart on emulator Nexus 5X in locale en-US ...
Using device Android SDK built for x86.
Starting application: test_driver/full_app.dart
Initializing gradle...                                           0.8s
Resolving dependencies...                                        1.4s
Installing build/app/outputs/apk/app.apk...                      2.0s
Gradle task 'assembleDebug'...                                   1.4s
Built build/app/outputs/apk/debug/app-debug.apk.
I/flutter ( 5111): Observatory listening on http://127.0.0.1:36003/
00:00 +0: scrolling performance test (setUpAll)
00:00 +0: scrolling performance test screenshots
Screenshot created
Screenshot created
Screenshot created
00:12 +1: scrolling performance test (tearDownAll)
00:12 +1: All tests passed!
Stopping application instance.
Processing screenshots from test...
moving screenshots to android/fastlane/metadata/android/en-US/images/phoneScreenshots
Stopping emulator: Nexus_5X ...
Emulator is stopped
simulatorInfo=null
Starting simulator: iPad Pro (12.9-inch) (2nd generation) ...
Unhandled exception:
NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling: []("status")
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      simulator (package:screenshots/screenshots.dart:116:22)
#2      run (package:screenshots/screenshots.dart:54:7)
<asynchronous suspension>
#3      main (file:///Users/xxx/.pub-cache/hosted/pub.dartlang.org/screenshots-0.1.0/bin/main.dart:67:3)
<asynchronous suspension>
#4      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

$ xcrun simctl list

== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone 8 (com.apple.CoreSimulator.SimDeviceType.iPhone-8)
iPhone 8 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPhone X (com.apple.CoreSimulator.SimDeviceType.iPhone-X)
iPhone Xs (com.apple.CoreSimulator.SimDeviceType.iPhone-XS)
iPhone Xs Max (com.apple.CoreSimulator.SimDeviceType.iPhone-XS-Max)
iPhone Xʀ (com.apple.CoreSimulator.SimDeviceType.iPhone-XR)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad (5th generation) (com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation-)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
iPad Pro (12.9-inch) (2nd generation) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-)
iPad Pro (10.5-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-)
iPad (6th generation) (com.apple.CoreSimulator.SimDeviceType.iPad--6th-generation-)
iPad Pro (11-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--11-inch-)
iPad Pro (12.9-inch) (3rd generation) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---3rd-generation-)
Apple TV (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple TV 4K (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K)
Apple TV 4K (at 1080p) (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
Apple Watch Series 3 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm)
Apple Watch Series 3 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm)
Apple Watch Series 4 - 40mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-40mm)
Apple Watch Series 4 - 44mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-44mm)
== Runtimes ==
iOS 12.1 (12.1 - 16B91) - com.apple.CoreSimulator.SimRuntime.iOS-12-1 
tvOS 12.1 (12.1 - 16J602) - com.apple.CoreSimulator.SimRuntime.tvOS-12-1 
watchOS 5.1 (5.1 - 16R591) - com.apple.CoreSimulator.SimRuntime.watchOS-5-1 
== Devices ==
-- iOS 12.1 --
    iPhone 5s (9D9C5874-5228-4CDD-B9CB-602B12F83E4C) (Shutdown) 
    iPhone 6 (9178173A-67D2-4A5F-9F29-AA257C210597) (Shutdown) 
    iPhone 6 Plus (29E6CAB0-B580-4851-B043-7B078BCD13B6) (Shutdown) 
    iPhone 6s (E2754CCD-5659-46B9-BD11-6DDE30BEA3BE) (Shutdown) 
    iPhone 6s Plus (BC8A2B08-481F-4272-B477-7BABAD772965) (Shutdown) 
    iPhone 7 (8F3C16AC-C8B4-4D67-890A-8FDB1AFEBC4A) (Shutdown) 
    iPhone 7 Plus (CD2CE152-87D7-49CA-91CC-D6807E62C091) (Shutdown) 
    iPhone 8 (DABB9131-09E4-43DA-BF05-F3C5B44AECEB) (Shutdown) 
    iPhone 8 Plus (89AC9776-DDC5-4B93-982C-39C402EB66A8) (Shutdown) 
    iPhone SE (90984237-8734-4744-B3DF-C73CB2124096) (Shutdown) 
    iPhone X (3708943A-66B5-44D8-95FD-B9C7D1DA618F) (Shutdown) 
    iPhone XS (669E7266-04DC-4BAA-9AD6-6261D0031772) (Shutdown) 
    iPhone XS Max (8841B488-B02A-4E16-9FA6-588BFF95DD8C) (Shutdown) 
    iPhone XR (448602B0-7586-4936-BC29-5998ED4173F0) (Shutdown) 
    iPad Air (FA6D2EE6-C0EC-4F3A-B0FE-F12311A28134) (Shutdown) 
    iPad Air 2 (5E50FCCB-DAE0-4198-A443-80BCC20AF304) (Shutdown) 
    iPad (5th generation) (EAC28DDE-D6FB-40E6-B8C5-2137E7CD0CE0) (Shutdown) 
    iPad Pro (9.7-inch) (768AF28B-E05C-4101-83CF-4CF9FBC6034E) (Shutdown) 
    iPad Pro (12.9-inch) (0DD14CC8-4D97-428B-B2B6-90AB37A2A891) (Shutdown) 
    iPad Pro (12.9-inch) (2nd generation) (3BF25AC7-AD3E-48DC-AB13-710C5EECC4BC) (Shutdown) 
    iPad Pro (10.5-inch) (0716DBE3-C09C-49DC-AE4E-36865EF119F2) (Shutdown) 
    iPad (6th generation) (D6A156B1-3EB7-4A63-9165-8D3F15F605EE) (Shutdown) 
    iPad Pro (11-inch) (5AE98892-A24A-4EFD-8749-404E7130C772) (Shutdown) 
    iPad Pro (12.9-inch) (3rd generation) (1634CBDF-4B3E-4D8F-AF56-26E2B5C28378) (Shutdown) 
-- tvOS 12.1 --
    Apple TV (FD20C35B-A1C1-48F1-BFD6-053D8797A6E8) (Shutdown) 
    Apple TV 4K (23596911-3D4B-4498-9C4B-CD65E85B1D37) (Shutdown) 
    Apple TV 4K (at 1080p) (A9ECC6CE-527B-4A74-985A-05E3D1AEEA4E) (Shutdown) 
-- watchOS 5.1 --
    Apple Watch Series 2 - 38mm (564A1B89-B926-4461-A49C-3B9D074F5DF9) (Shutdown) 
    Apple Watch Series 2 - 42mm (17F9D296-8D95-4AB2-B926-59B397622508) (Shutdown) 
    Apple Watch Series 3 - 38mm (280ADB5B-DF09-4A00-A953-0D71B47C64E5) (Shutdown) 
    Apple Watch Series 3 - 42mm (ADFB6087-2EFA-40AB-A145-1FED4F519FD8) (Shutdown) 
    Apple Watch Series 4 - 40mm (3D75ED51-7F35-4970-8E3F-17FD7BD48342) (Shutdown) 
    Apple Watch Series 4 - 44mm (24FFEE80-3D05-4180-80BC-7771A3DBB1DB) (Shutdown) 
== Device Pairs ==
79921F10-19CF-4BDD-A881-6748B283508C (active, disconnected)
    Watch: Apple Watch Series 4 - 40mm (3D75ED51-7F35-4970-8E3F-17FD7BD48342) (Shutdown)
    Phone: iPhone XS (669E7266-04DC-4BAA-9AD6-6261D0031772) (Shutdown)
486A6E47-2140-4731-A3C8-C96099EC7A87 (active, disconnected)
    Watch: Apple Watch Series 4 - 44mm (24FFEE80-3D05-4180-80BC-7771A3DBB1DB) (Shutdown)
    Phone: iPhone XS Max (8841B488-B02A-4E16-9FA6-588BFF95DD8C) (Shutdown)

Somehow, i've a whitespace after xxx(Shutdown)_ so the regex does not work:

r'^    (.*) \((.*-.*-.*-.*)\) \((.*)\)$'

should be something like?

r'^    (.*) \((.*-.*-.*-.*)\) \((.*)\)\s*$'
@mmcc007
Copy link
Owner

mmcc007 commented Feb 3, 2019

You are correct...

Just tested it on 2 Mac's.. one it parsed correctly, the other it did not...
I updated the package with the fix you suggested which parses correctly on both

Update to version 0.1.1 with

pub global activate screenshots

Let me know if working... or if you need anything else...

👍

@mmcc007 mmcc007 added bug Something isn't working waiting for response Issue addressed, response anticipated resolved Issue is considered resolved labels Feb 3, 2019
@frickt
Copy link
Author

frickt commented Feb 4, 2019

wow, that was fast.
It's working correct now.

Thanks a lot for fixing and for this great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Issue is considered resolved
Projects
None yet
Development

No branches or pull requests

2 participants