{ "id": "63066", "key": "TIMOB-2434", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-08T23:20:06.000+0000", "created": "2011-04-15T03:19:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-08T23:20:06.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

[FIX]

\n

EDIT: It took me an evening, but I found a\nfix/workaround for this issue. Read the post to see the steps I\ntook to fix it.

\n

Original post:
\nTitanium doesn't detect my Iphone Developer Certificate. The\n\"Install Now\" button on the \"Run on Device\" tab is disabled. So I\ncan't install to my Iphone.

\n

My name contains non-ascii characters and I think this could be\nthe reason it doesn't work. I have seen other tickets where people\nhave trouble because of non-ascii characters in their\ncertificates.

\n

I have a proper working certificate and I can install to my\nIphone from XCode without problems. I have tried deleting and\nreinstalling both the WWDR and the Developer Certificate. I have a\nworking provisioning profile.

\n

I'm using v. 1.2.1 of Titanium and the v. 4.2 Iphone SDK.

\n

EDIT:

\n

I checked the prerreq.py script and it seems the keychain dump\ndoes not work properly.

\n

I stepped through the script and discovered that the functions\nlooking for the different certificate strings were not finding\nanything. A closer look revealed that the problem was with the\ninitial keychain dump.

\n

I tried running the dump command from the script in the python\nshell:

\n
\noutput = run.run(['security','dump-keychain'],False,False)\n
\nThis should give a long string of keys and values, but it just\nreturn gives the first couple of rows from the keychain dump.
\nThe result is cut off just after my name appears. The reason\nprobably being that my name contains non-ascii characters which\ncrashes the string handlers.\n

To work around this I ran an ordinary keychain dump in\nTerminal

\n
\nsecurity dump-keychain -d login.keychain\n
\nand saved the output to a text file.
\nI set the prereq.py to read from that file instead of trying to get\nthe dump directly. This seems to solve some of the problems, as the\nrest of the functions in the prereq.py file now correctly\nidentifies my certificates.\n

I still can´t install to device though. It seems there is\na similar problem with reading the provisioning profile. I haven't\ntried to work around it yet.

\n

EDIT 2:

\n

I had made a mistake in reading the keychain file in the script.\nWhen I fixed that the certificates were detected in the Titanium\nGUI and the Install Now button was enabled!

\n

However, when I click Install Now, I get a \"Install error\", so\nit still does not work. :(

\n

EDIT 3:

\n

The build.log contains the following error:

\n

Exception detected in script:
\nTraceback (most recent call last):
\nFile \"/Library/Application\nSupport/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py\", line 994,\nin main

\n
\nexecute_xcode(\"iphoneos%s\" % iphone_version,args,False)\n
\n

File \"/Library/Application\nSupport/Titanium/mobilesdk/osx/1.4.2/iphone/builder.py\", line 780,\nin execute_xcode

\n
\nfor arg in args: o.write(\"    %s\\n\" % arg)\n
\n

UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe4'\nin position 64: ordinal not in range(128)

\n

EDIT 4 - the fix:

\n

Traced that error to the following statement:

\n
\no.write(\"Starting Xcode compile with the following arguments:\\n\\n\")\nfor arg in args: o.write(\"    %s\\n\" % arg)\n
\n

The o.write apparently does not honor the utf-8 encoding in the\nfile and crashes trying to print my name.
\nSince the line seemed to be just a log output i commented it out\nlike so:

\n
\n#for arg in args: o.write(\"    %s\\n\" % arg)\n
\n

And would you believe it...

\n

Now it installs!

\n

Now that wasn't so hard was it?
\nI hesitate to call this a fix, but at least it's a usable work\naround.

\n

Happy Non-ASCII:ing to all my fellow Scandinavians (and the rest\ntoo of course)!

\n

/Martin

{html}", "attachment": [], "flagged": false, "summary": "Titanium does not detect Iphone Certificate because of non-ascii characters in name", "creator": { "name": "mrmartin", "key": "mrmartin", "displayName": "MrMartin", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mrmartin", "key": "mrmartin", "displayName": "MrMartin", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "421572", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as there has been no input for the last 6 years. Any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-08T23:20:06.000+0000", "updated": "2017-06-08T23:20:06.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }