Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

don't work for ios 13.3 on osx 10.15.5 #116

Closed
clouduol opened this issue Jun 10, 2020 · 8 comments
Closed

don't work for ios 13.3 on osx 10.15.5 #116

clouduol opened this issue Jun 10, 2020 · 8 comments

Comments

@clouduol
Copy link

clouduol commented Jun 10, 2020

I followed this doc https://github.com/snipsco/dinghy/blob/master/docs/ios.md, it all worked fine until I ran the final test command. I can run the test xcode project on my iphone, but when I ran cargo dinghy -d iphone test it_works, it reported an error.

command:
RUST_BACKTRACE=1 cargo dinghy -d iphone test it_works

output:

[2020-06-10T12:15:03Z INFO  cargo_dinghy] Targeting platform 'auto-ios-aarch64' and device '***'
    Finished debug [unoptimized + debuginfo] target(s) in 0.02s
[2020-06-10T12:15:07Z ERROR cargo_dinghy] error: e80000be

    Stack backtrace:
       0: std::backtrace::Backtrace::create
       1: std::backtrace::Backtrace::capture
       2: dinghy_lib::ios::device::mk_result
       3: dinghy_lib::ios::device::IosDevice::install_app
       4: <dinghy_lib::ios::device::IosDevice as dinghy_lib::Device>::run_app
       5: cargo_dinghy::prepare_and_run
       6: cargo_dinghy::main
       7: std::rt::lang_start::{{closure}}
       8: std::rt::lang_start_internal
       9: main

Here is the environment:
mac:
os version: 10.15.5 (19F101)
xcode version: 11.5 (11E608c)

iphone:
model: iPhone 8
os version: 13.3

What should I do to make it work?

@simlay
Copy link
Contributor

simlay commented Jun 11, 2020

I'll admit that I haven't actually tested out on-device unit tests so this could very well be a new bug. Do your unit tests need to run on the actual iPhone or would the iOS simulator work? The setup is much easier with the simulator. If you've got an iOS simulator running you can just do cargo dinghy --platform auto-ios-x86_64 test it_works. Dinghy should find the simulator and run it in the simulator. You can also specify the simulator ID like CI does.

@kali
Copy link
Collaborator

kali commented Jun 11, 2020

So this error is

226:	{ 0xe80000be, "kAMDMismatchedApplicationIdentifierEntitlementError" },
398:	{ "kAMDMismatchedApplicationIdentifierEntitlementError", "This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed." },

Could you double check that the application id you used in the xcode project is as:

Make the bundle identifier some.unique.domainame.Dinghy.
So Product Name is Dinghy, and Organization identifier is something that will be unique and looks like a domain name in reverse.

@kali kali closed this as completed Jun 11, 2020
@kali kali reopened this Jun 11, 2020
@kali
Copy link
Collaborator

kali commented Jun 11, 2020

Sorry, did not meant to click on close. need more coffee.

@kali
Copy link
Collaborator

kali commented Jun 11, 2020

I just checked here, same xcode, same macOS, actually same phone, but with latest update (iOS 13.5.1), and everything works as expected. I don't think the iOS verson is our problem here. So don't despair, this is probably "just" a configuration issue.

Please make an attempt with "-v", and grep the "ios".

I will also add a descriptive message for this error code.

@clouduol
Copy link
Author

clouduol commented Jun 12, 2020

I'll admit that I haven't actually tested out on-device unit tests so this could very well be a new bug. Do your unit tests need to run on the actual iPhone or would the iOS simulator work? The setup is much easier with the simulator. If you've got an iOS simulator running you can just do cargo dinghy --platform auto-ios-x86_64 test it_works. Dinghy should find the simulator and run it in the simulator. You can also specify the simulator ID like CI does.

It worked well on a iPhone 8 simulator with iOS 13.5.

@clouduol
Copy link
Author

clouduol commented Jun 12, 2020

So this error is

226:	{ 0xe80000be, "kAMDMismatchedApplicationIdentifierEntitlementError" },
398:	{ "kAMDMismatchedApplicationIdentifierEntitlementError", "This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed." },

Could you double check that the application id you used in the xcode project is as:

Make the bundle identifier some.unique.domainame.Dinghy.
So Product Name is Dinghy, and Organization identifier is something that will be unique and looks like a domain name in reverse.

I checked the bundle id, and the Product Name is not Dinghy but some-unique-domainame-Dinghy. I renamed the bundle id and ran RUST_BACKTRACE=1 cargo dinghy -d iphone test it_works again. This time it enterd an lldb shell. Here is the output:

[2020-06-12T06:41:21Z INFO  cargo_dinghy] Targeting platform 'auto-ios-aarch64' and device '***'
    Finished debug [unoptimized + debuginfo] target(s) in 0.00s
(lldb) command source -s 1 '/var/folders/_7/qxf7q11175sg3lj4kkqrnff00000gn/T/mobiledevice-rs-lldb.KjON8swVe2LV/lldb-script'
(lldb)

I'v already updated my iOS version to the latest 13.5.1. Here is a part of the output with -v option.

[2020-06-12T07:00:36Z DEBUG dinghy_lib::ios::device] mount developper image
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Looking for device support directory in "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" for iOS version "13.5.1"
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Picked "13.5"
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Developper image path: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.5/DeveloperDiskImage.dmg"
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] AMDeviceMountImage returns: e8000076
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Error, already mounted, going on
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] start debugserver on phone
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] debug server running
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] start local lldb proxy
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] started lldb proxy localhost:61747
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Looking for device support directory in "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" for iOS version "13.5.1"
[2020-06-12T07:00:37Z DEBUG dinghy_lib::ios::device] Picked "13.5"
(lldb) command source -s 1 '/var/folders/_7/qxf7q11175sg3lj4kkqrnff00000gn/T/mobiledevice-rs-lldb.8weA1ngJXDYe/lldb-script'
(lldb) r
error: the platform is not currently connected
(lldb)

It worked well with the simulator. Hope for your help.

@kali
Copy link
Collaborator

kali commented Jun 12, 2020

I'm not too sure what to make of this... the guys from ios-deploy have this issue here:

ios-control/ios-deploy#19

So... have you tried turning it off and on again ?

@clouduol
Copy link
Author

clouduol commented Nov 14, 2020

So sorry for not replying in time. In the end, i did not use dinghy. And do not know what is the problem.

@sonos sonos locked and limited conversation to collaborators Nov 14, 2020
@kali kali closed this as completed Nov 14, 2020
@sonos sonos unlocked this conversation Nov 14, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants