Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-209] Studio: iOS SDK home not found and NullPointerException

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2017-12-14T07:01:32.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 1.0.1
Componentsappcd-plugin-ios, ioslib
Labelsn/a
ReporterSebastian Klaus
AssigneeChris Barber
Created2017-12-11T08:39:21.000+0000
Updated2017-12-18T11:53:43.000+0000

Description

I updated to Appcelerator Studio 5.0.0.201712081732 (official Release) and now the iOS SDK home is not found anymore. Android works. Can I do something to fix it? -- There's a bug in ioslib when it tries to build the list of teams. If one of the provisioning profiles does not have any teams, then the teamIds will be null. The code that builds the unique list of teams expects teams to be an array.

Attachments

FileDateSize
Appc_Daemon_Dump.txt2017-12-14T02:50:40.000+0000849453
appcInfo.txt2017-12-14T02:50:30.000+000060243
Bildschirmfoto 2017-12-11 um 09.36.17.png2017-12-11T08:38:50.000+0000413885
DiagnosticLog.txt2017-12-14T02:50:58.000+0000213879
StudioLog.txt2017-12-14T02:51:32.000+00002429589

Comments

  1. Mostafizur Rahman 2017-12-11

    Hello [~benutzername], Thanks for sharing us. Which Xcode version are you using? Do you have multiple Xcode? It would be better if you can share full environmental details here. Best
  2. Sebastian Klaus 2017-12-11

    Sorry. I'm using Xcode Version 9.2 (9C40b) and no multiple versions appc ti setup check says: Node.js ✓ node installed (v9.2.0) ✓ npm installed (v5.5.1) Titanium CLI ✓ cli bleeding edge (v5.0.14) Titanium SDK ✓ latest sdk installed (v7.0.0.GA) ! selected sdk latest Titanium SDK "v4.0.0.GA" is not the selected SDK (currently v6.3.0.GA) Mac OS X Environment ✓ CLI Tools installed iOS Environment ✓ Xcode installed (9.2) ✓ iOS SDK installed (11.2) ✓ WWDR cert installed ✓ developer cert installed (1 found) ✓ distribution cert installed (3 found) ✓ dev provisioning installed (6 found) ✓ dist provisioning installed (6 found)
  3. Ewan Harris 2017-12-11

    [~benutzername] (and anyone else who has this issue) Could you please attach the following * Appc Daemon dumpfile generated from Help -> Studio -> Generate Appc Daemon Dump * Studio logfile from Help -> Studio -> View Log File * Studio diagnostic log from Help -> Studio -> Run Diagnostic test * Appc daemon iOS info appc appcd exec /ios/1.x/info ran in terminal * Appc Ti info appc ti info Please upload either to this ticket or in a gist/pastebin
  4. Marian Kucharcik 2017-12-11

    Hi Ewan, I created Daemon dump and Log file, Diagnostic test encountered a error(null pointer exception) and that last command shows URI malformed [Here is that files:](https://1drv.ms/f/s!AqYLRbx94HRJmG4QP8SYdMzadmst)
  5. Kondal Kolipaka 2017-12-11

    [~max87] Can you please share the generated log files.
  6. Ewan Harris 2017-12-11

    [~max87] Thanks for those, would you also be able to upload the output of appc ti info -t ios -o json (I missed that from my list sorry!)
  7. Sebastian Klaus 2017-12-11

    Here is mine _appc ti info -t ios -o json_ https://pastebin.com/Mr8Km002
  8. Ewan Harris 2017-12-11

    [~benutzername] I believe that issue may be caused by an unsupported node version, could you try downgrading to [node 8.9.2](https://nodejs.org/en/download/), we need to update the prebuilt binaries for node-ios-device to support 9.X I believe
  9. Sebastian Klaus 2017-12-11

    [~eharris] That did the trick
  10. Chris Barber 2017-12-11

    DAEMON-205 certainly addresses the "URI malformed" issue. There are a couple reasons ti info may not see this error. First, ioslib v2 now uses node-forge where ioslib v1 used a copy of an old version of node-forge to speed up certificate parsing (not an issue in the context of the daemon). Secondly, ioslib v2 now fetches and parses EVERY cert and filters out all non-iOS development related certs. This reduces the number of subprocesses from 5 to 1 and increases speed. However, now we face certain certs that may or may not be iOS related that we cannot parse. DAEMON-205 simply skips those certs that it cannot parse. ioslib@2.0.4 which includes this fix has been published, though Appc CLI users will not see the update until the next published version.
  11. Marian Kucharcik 2017-12-11

    Hi guys, downgrading node to linked 8.9.3 or manually to 8.9.2 doesn't solve it for me, it throws same errors as previously mentioned. Please any other advices? Thanks
  12. Zarir Bhesania 2017-12-12

    Facing the same issue. Can we get a fix by this week as its very critical?
  13. Marian Kucharcik 2017-12-12

    Hello Zarir, I tried to downgrade Studio to 4.1.0 and it works for me now. So please try it(so you can develop) and wait for fix from Appc guys. I hope, that fix will be available very soon.
  14. Sebastian Klaus 2017-12-12

    [~max87] you can just downgrade your node version to 8.9.2 and it works. So can install Studio 5.0.0
  15. Marian Kucharcik 2017-12-12

    @Sebastian Klaus as I mentioned above, downgrading just node to 8.9.2(tried also 3 and 0 ) doesn't worked for me, so I tried to downgrade Studio and that finally worked.
  16. Kondal Kolipaka 2017-12-12

    [~zarirbhesania@gmail.com] What is the node version which you're using? Can you use node 8.9.1 and restart the studio. Please provide below logs as well.

    Appc Daemon dumpfile generated from Help -> Studio -> Generate Appc Daemon Dump

    Studio logfile from Help -> Studio -> View Log File

    Appc daemon iOS info appc appcd exec /ios/1.x/info ran in terminal

    Appc Ti info appc ti info

  17. Alberto Marcone 2017-12-12

    downgrading to Studio 4.5 worked for me too, the quickest fix.
  18. Zarir Bhesania 2017-12-12

    @Kondal Kolipaka I tried node v8.9.1 and 8.9.2 but it dint work. So I downgraded studio to 4.10.0 and its working now
  19. Kondal Kolipaka 2017-12-12

    [~zarirbhesania@gmail.com] Okay, will update once DAEMON-205 is available for release. Hopefully, that will fix the issue for you. Can you run the below commands and attach the output - that will help us to analyze the problem and plan for a next release with the fix.

    Appc daemon iOS info appc appcd exec /ios/1.x/info ran in terminal

    Appc Ti info appc ti info

  20. John Staunton 2017-12-12

    As requested by @eharris, hereby the info: 1. Appc Daemon dumpfile generated from Help -> Studio -> Generate Appc Daemon Dump [Attached] 2. Studio logfile from Help -> Studio -> View Log File https://pastebin.com/3Bd3b3Jc 3. Studio diagnostic log from Help -> Studio -> Run Diagnostic test Could not run: !ENTRY org.eclipse.core.jobs 4 2 2017-12-12 11:20:04.208 !MESSAGE An internal error occurred during: "Getting Diagnostic Logs". !STACK 0 java.lang.NullPointerException at com.appcelerator.titanium.ios.internal.core.IOSDiagnosticLog.getLog(IOSDiagnosticLog.java:28) at com.aptana.core.internal.diagnostic.DiagnosticManager$LazyDiagnosticLog.getLog(DiagnosticManager.java:166) at com.aptana.ui.commands.DiagnosticHandler.getLogContent(DiagnosticHandler.java:66) at com.aptana.ui.commands.DiagnosticHandler$1.run(DiagnosticHandler.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 4. Appc daemon iOS info appc appcd exec /ios/1.x/info ran in terminal https://pastebin.com/JZgNyA2V 5. Appc Ti info appc ti info https://pastebin.com/vMK3TCYU
  21. Ewan Harris 2017-12-12

    For people who are running into this issue, we have published an update that should fix most of the issues we are aware of. This will ship in a 7.0.1 release which is being scheduled but we would like feedback prior to this so we can be sure of fixing all issues. It can be installed using the below, while doing this please make sure Studio is closed

    Stop the daemon appc appcd stop

    cd into the appcelerator package cd ~/.appcelerator/install/7.0.0/package

    Install the update npm install ioslib@next

    Reopen Studio

  22. Zarir Bhesania 2017-12-12

    @Ewan Harris Performed the steps mentioned above but still Xcode not getting detected. Error "An internal error occurred during: "Update iOS info". java.lang.NullPointerException"
  23. Ewan Harris 2017-12-12

  24. saladlife 2017-12-13

    I got the same problem and tried different way cannot solve the problem. I had sent the log by mail.
  25. Sathaphorn Kerdmalai 2017-12-14

    I do have the same problem. (Axway Appcelerator Studio, build: 5.0.0.201712081732) How can I fix this problem?
  26. Kondal Kolipaka 2017-12-14

    [~iblack.dum] What is the Xcode version you're having? Did you launch Xcode after installing for the first time? Usually, if you've installed Xcode and not launched at least once you will be having issues in identifying Xcode due to "Xcode EULA". Go to terminal and run "appc ti info" and see if you're having the below issue
        iOS Issues
          ✕  Xcode EULA has not been accepted.
             Launch Xcode and accept the license.
        
  27. Sathaphorn Kerdmalai 2017-12-14

    @Kondal I installed the latest version of Xcode and I using xcode every day.
  28. Kondal Kolipaka 2017-12-14

    [~iblack.dum] Is it possible for you to get into call for 20 mins? I would like to capture few logs and analyze the issue. https://axway.webex.com/meet/kkolipakaaxway.com To understand more about the issue we need to capture the logs in the following order. 1. Go to Studio Preferences - Studio - Trouble Shooting - Set "Debug Level" to "All"- Click on Apply 2. Go to Help -> Studio -> Clear Log file 3. Restart Studio 4. Wait for Studio dashboard to open 5. Open Studio Preferences -Studio - iOS - verify Xcode(as you're facing the issue here) 6. Go to Help -> Studio ->Generate Appc Dump 7. Go to Help -> Studio -> View Log File 8. Go to Help -> Studio -> Run Diagnostic Test 9. Go to terminal -> run “appc ti info” -> export to some log file
  29. Kondal Kolipaka 2017-12-14

    [~morahman] [~iblack.dum] Thanks a lot. Logs are helpful. We found the root cause of the problem. Will fix this soon and update the ticket ASAP.
  30. Chris Barber 2017-12-14

    ioslib PR: https://github.com/appcelerator/ioslib/pull/73 ioslib@2.0.6 has been published. appcd-plugin-ios master PR: https://github.com/appcelerator/appcd-plugin-ios/pull/3 appcd-plugin-ios 1_0_X PR: https://github.com/appcelerator/appcd-plugin-ios/pull/4
  31. Marian Kucharcik 2017-12-14

    Hi guys, how can I update that lib and where is located? Thanks
  32. Marcio Cunha 2017-12-14

    Do we have to execute the below steps to update ?

    Stop the daemon appc appcd stop

    cd into the appcelerator package cd ~/.appcelerator/install/7.0.0/package

    Install the update npm install ioslib@next

    Reopen Studio

  33. Chris Barber 2017-12-14

    This should work:

    Close Appcelerator Studio

    Open the terminal

    Stop the daemon: appc appcd stop

    cd into the appcelerator package: cd ~/.appcelerator/install/7.0.0/package

    Install the update: npm install ioslib@next

    Reopen Studio

  34. John Staunton 2017-12-14

    Can't get the update to work: npm ERR! path /Users/johnstaunton/.appcelerator/install/7.0.0/package/node_modules/node-ios-device/node_modules/node-pre-gyp npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/Users/johnstaunton/.appcelerator/install/7.0.0/package/node_modules/node-ios-device/node_modules/node-pre-gyp' -> '/Users/johnstaunton/.appcelerator/install/7.0.0/package/node_modules/node-ios-device/node_modules/.node-pre-gyp.DELETE' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
  35. Chris Barber 2017-12-14

    [~john.staunton] Maybe it's best to install ioslib@next to an empty folder and manually copy into ~/.appcelerator/install/7.0.0/package/node_modules.
  36. John Staunton 2017-12-14

    Thanks @Chris Barber... ioslib is at 2.0.6 now within ~/.appcelerator/install/7.0.0/package/node_modules but the issue persists - internal error during: "Loading certificates"
  37. Chris Barber 2017-12-14

    [~john.staunton] Try closing studio, stop the daemon from the terminal by running appc appcd stop, then restart studio, reproduce the problem, then as quick as possible run appc appcd dump mydump.json. Attach the dump file and we'll see if we can figure out if it's a studio or daemon related issue. Thanks!
  38. John Staunton 2017-12-14

    @Chris Barber, sent it directly to you by email. Thanks!
  39. Chris Barber 2017-12-14

    John's issue is possibly due to a permission that exposed a bug in the system-info plugin. The system-info plugin bug was fixed in DAEMON-210 and set for the upcoming 1.0.1 release.
  40. Marian Kucharcik 2017-12-14

  41. Marian Kucharcik 2017-12-18

    Hi guys, I can't add new provisioning profile to Appc Studio. I create Ad-hoc prov.profile via Apple developer website and download it, double click on in, opens xcode. I restart Appc Studio but profile doesn't show up. Also, when I delete some provisioning profiles and hit Refresh(Right click on project in Appc Studio-Distribute-Adhoc-refresh), profiles don't refresh(there are entries that no longer exists in Apple developer website) Please take a look asap. Thanks
  42. Satyam Sekhri 2017-12-18

  43. Marian Kucharcik 2017-12-18

    Thank you Satyam for pointing me to right ticket, it worked for me.

JSON Source