Failed to upgrade the iOS application while app is doing network operations using sockets - ios

When I am trying to update the application using iTunes, I am getting a error pop-up - Unable to download application.
I am running into this error only when my app is doing network operations using sockets.
In other scenarios where app is either not running or is idle, it works correctly.
From the console logs, I got following error message -
2013-04-18 10:11:39 AM GMT+07:00 backboardd <Warning>: pid_suspend failed for [7104]: Unknown error: -1, Unknown error: -1
2013-04-18 10:11:39 AM GMT+07:00 backboardd <Warning>: Could not set priority of [7104] to 4096, priority: No such process
2013-04-18 10:11:39 AM GMT+07:00 backboardd <Warning>: Application 'UIKitApplication:com.avaya.AVSIPiPhoneCFE[0xe6ed]' exited abnormally with signal 9: Killed: 9
Any idea why this would happen?

This question addresses a similar problem.
In short, iOS automatically restarts an app that crashes or exits abnormally, if it has a background execution flag set. It seems that this leads to iTunes being unable to overwrite the old binary with the new one, because it's still running.

Related

iOS Release App crashes on Launch "Unable to get pid for label"

Disclaimer: I am not using Expo.
react: 16.8.3
react-native: 0.59.9
react-native-cli: 2.0.1
iOS 12.2 (16E227)
I have this weird problem with my React Native iOS app that has been happening for a while. At a first glance everything works as excepted, both Development and Release. I am able to install it in my device and use it without the metro server running.
However after some time, like couple of days the app in my phone won't launch, it crashes at the launch screen, the one that says "Powered by React Native ..." with the following errors showing up in the console:
Process: assertiond
Failed to start job with error <NSError: 0x103e56f70; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
description = "Unable to get pid for label UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62]";
failureReason = "No such process";
userInfo = {
BKLaunchdJobLabel = UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62];
BKLaunchdOperation = launch_get_running_pid_4SB;
}
}
Process: SpringBoard
[org.josemigallas.RealmsCounter] Bootstrap failed with error: <NSError: 0x2830c26a0; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
Process: SpringBoard
Bootstrapping failed for <FBApplicationProcess: 0x1371b5470; org.josemigallas.RealmsCounter; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID org.josemigallas.RealmsCounter" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID org.josemigallas.RealmsCounter, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x2830c0210 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], BKLaunchdJobLabel=UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:org.josemigallas.RealmsCounter[0x953c][62], BSErrorCodeDescription=bootstrap-failed}
Is this a bug? Or did I do something wrong with the Xcode configuration? The React Native documentation is of no use Xcode wise and so is iOS's because this is something in between of both.
Any ideas?
OK, turned out it as simple as the provisioning profile is only valid for 6 days without a paid Apple Developer account... The app will work during the first days then inevitably it won't start anymore and it has to be rebuild again.

Can't download iOS app using in house at iOS 10.3 release version

I update the iOS to iOS 10.3 release version,
I try to download the in-house app through the safari,
but show the below error message(the log from device ).
itunesstored(libsystem_network.dylib)[240] <Error>: nw_coretls_callback_handshake_message_block_invoke_3 tls_handshake_continue: [-9812]
itunesstored(CFNetwork)[240] <Notice>: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
itunesstored(CFNetwork)[240] <Error>: HTTP load failed (error code: -1202 [3:-9813])
itunesstored(CFNetwork)[240] <Error>: NSURLSessionTask finished with error - code: -1202
itunesstored[240] <Notice>: LoadExternalDownloadManifestOperation: Request failed with error: <private>
itunesstored[240] <Error>: Could not load download manifest with underlying error: <private>
I test the in house to install at the iOS 10.2.1. It is install correct.
But the iOS 10.3 will show the alert ( cannot connect to IP ).
Have anyone known what happened in my case?
thank you very much.
I figured it out, it seems just trusting the certificate is no longer enough. You need to go into General -> About (yes, About, what a great place) -> Certificate Trust Settings. Then tick the switch next to your CA to trust it.

Appium [iOS] Instruments crashed on startup

When Appium tries to run application, the screen flashes with app splash screen, as if Appium tries to launch app multiple times. This behaviour happens both on simulator and real device.
I set enable on my iOS devices UI Automation, but when I try start inspector I have this problem:
info: [debug] [INST STDERR] 2015-11-05 15:11:05.082 instruments[1495:39489] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2015-11-05 15:11:06.049 instruments[1495:39460] Attempting to change event horizon while disengage
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] [INST STDERR] 2015-11-05 15:11:06.049 instruments[1495:39462] Attempting to change event horizon while disengage
Instruments Trace Error : Target failed to run: Permission to debug com.myapp.iphone was denied. The app must be signed with a development identity (e.g. iOS Developer).
info: [IOS_SYSLOG_ROW ] Nov 5 15:11:04 tests-iPod com.apple.xpc.launchd[1] (UIKitApplication:com.myapp.iphone[0xe163][607]) <Notice>: Service exited due to signal: Killed: 9
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Reset not set, not ending sim or cleaning up app state
info: [debug] Cleaning up appium session
info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31)
at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null
info: <-- POST /wd/hub/session 500 33841.937 ms - 182}
Application is in form of .ipa
Target failed to run: Permission to debug com.myapp.iphone was denied.
The app must be signed with a development identity (e.g. iOS Developer).
You application should be signed with developers key. Click here for documentation
If you are using iOS Simulator, do the following...
In Appium, go to Developer Settings, Check Custome Server Flags and write --native-instruments-lib in the text box.
Now start Appium Server.
Hope this helps!
BlockquoteTarget failed to run: Permission to debug com.myapp.iphone was denied.
The app must be signed with a development identity (e.g. iOS Developer).
Blockquote
You should give your developer identity while creating the .ipa...
If you are creating ipa file through terminal, you can follow the given link [blog]: Xcode "Build and Archive" from command line
I also struggled with this problem and found that you need to enable UI automation in developer option in you iDevice
How to enable UI Automation
1. switch off the iDevice,
2. then connect it to the Mac running Xcode
3. before switching it back on to have Developer options appear.
4. tap on developer option and Enable UI automation
In my case, the following command made my life hell:
rm -rf $HOME/Library/Developer/Xcode/iOS\ DeviceSupport/*
So don't add it to the build step.
To fix the issue:
Restart device > run Xcode > connect device > build & run the app > stop & quit Xcode
Now verify launching app without crashing the instruments.

What does the installation errror "The packet is unknown" mean?

I am trying to use Xcode 6.2 to install a development build of an iOS app onto my iPod touch (running iOS 8.2).
The installation keeps failing with the message
App instalation failed
The packet is unknown.
The console reports the following details:
Mar 27 12:53:52 iPod-touch com.apple.StreamingUnzipService[164] <Warning>: -[StreamingUnzipState finishStream]:476: Finishing an incomplete stream! This stream will not be resumable.
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: __dispatch_source_read_socket_block_invoke_2:171: Failed to finish extraction: Error Domain=SZExtractorErrorDomain Code=3 "Finishing an incomplete stream! This stream will not be resumable." UserInfo=0x17e33b50 {SZExtractorFunctionNameErrorKey=-[StreamingUnzipState finishStream], SZExtractorSourceFileLineErrorKey=476, NSLocalizedDescription=Finishing an incomplete stream! This stream will not be resumable.}
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: secure_send_message:105: Got error 1 from lockdown_send_message
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: secure_send_error:137: Could not send error response to host
These messages seem to imply that the IPA file is somehow corrupted, and can't be extracted, but I had no problem unziping the IPA with Archive Utility on my Mac.
I also already ran codesign -dvvv on Payload/<my-app-name>.app and don't see any obvious problems with the certificate used to sign the app.
What does this error message indicate, and how can the issue be resolved?
note:
I already found this similar question but the only current answer does not help me. Since I have some, possibly relevant, details that may not apply to the previous question, I am asking a new question.
So I was getting this exact error and I tried switching USB ports (from the device plugged into the USB port on my keyboard to the USB port on my laptop) and now it works.

Ad-hoc distribution fail

I work for a big company, and I'm developing an iOS app for iOS 5+. The only way the app will be distributed will be through ad-hoc deployment.
I have had my own server for some time, hosted by o2switch (french hoster). As I started the development, we used it to deploy the app for beta testing purposes. It was working pretty well.
As the app entered its final phase, the company bought the same (in fact, they only have a single one) plan at o2switch (as it was working fine on my server). The "new" server works fine, we have the files required by the iOS app on it and we access them correctly.
My problem is that when I deploy over to the company's server, the install keeps crashing ! The bar below the app's icon is empty, the almost full (in no time), and I get an error saying the app could not be installed. (classic)
I have the so-well-known crash log :
unknown itunesstored[1657] <Notice>: MS:Notice: Installing: com.apple.itunesstored [itunesstored] (690.10)
unknown wifid[23] <Error>: WiFi:[375199765.346102]: Client itunesstored is background application
unknown securityd[1659] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)
unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'
unknown sandboxd[1661] <Notice>: MS:Notice: Installing: (null) [sandboxd] (690.10)
unknown installd[1663] <Notice>: MS:Notice: Installing: (null) [installd] (690.10)
unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'
unknown keybagd[1665] <Notice>: MS:Notice: Installing: (null) [keybagd] (690.10)
unknown securityd[1667] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)
unknown SpringBoard[62] <Warning>: Killing *********** for app installation
unknown installd[1663] <Error>: 2ffc1000 extract_package: Could not extract archive
unknown installd[1663] <Error>: 2ffc1000 stage_package: Could not extract /var/tmp/install_staging.I0rwBH/foo.zip to /var/tmp/install_staging.I0rwBH/foo_extracted
unknown com.apple.itunesstored[1657] <Notice>: MobileInstallationInstall: failed with -1
unknown installd[1663] <Error>: 2ffc1000 MobileInstallationInstall: Could not stage the package
unknown installd[1663] <Error>: 2ffc1000 handle_install: API failed
unknown installd[1663] <Error>: 2ffc1000 send_message: failed to send mach message of 71 bytes: 10000003
unknown installd[1663] <Error>: 2ffc1000 send_error: Could not send error response to client
I've tried a lot to get rid of this error, but nothing seemed to work. I've read every single answer on SO talking about this issue, and tried everything I could. I re-downloaded the profiles, updated the build number, checked the ipa's url, and so many other things.. Nothing worked.
I had to deliver the app quickly, so I tried one last thing : put it on my server. And it worked perfectly. First try, and with no problem (maybe one, the bar did not load progressively but stayed grey then filled in blue very quick, but that's not a problem, I know it downloaded the online version). Then I re-tried uploading to the new server, same problem.
BTW, I tested with: iPhone4/iOS5, iPhone4S/iOS6, iPhone5/iOS6, iPad3/iOS6 and a couple other devices, over 3G (3 different providers) and Wifi, same problem every single time.
So, my question is the following :
Does / how can the server impact the ad-hoc deployment ?
I can give information on the server's config if required. Please tell me what info you need.
O2switch is investigating, but they don't know much about iOS ad-hoc deployment, so they don't really know where to look, what service the install calls, etc.
So I'm turning (once again) to you, SO's community ! Any ideas ?
Check the mime-type configuration in the web-server. You need:
application/xml for the .plist file, and
application/octet-stream for the .ipa file.
Did you edit the App.plist file before you moved it to the new server?
The assets url must be absolute, like this: <string>http://someurl.com/App-1.0.0.ipa</string>.
If you are absolutely sure that server returns proper mime types, checked by:
lynx -mime_header http://www.serveraddress/App.plist | head -10
If you are sure that you don't have spaces or new lines in link to your .plist file in your html file.
If you are sure that you have added devices to provisioning profile
And if you have read: http://www.informit.com/articles/article.aspx?p=1829415&seqNum=16
I have all files: .plist, .html, .ipa in the same folder
Then I don't know what is the issue and would suggest you to distribute it from your working server.

Resources