Build fails with "ValueError: No JSON object could be decoded"
If I try to run the build on iOS simulator I get this in the console.
Specifically
Traceback (most recent call last): File "./json/scanner.py", line 30, in _scan_once IndexError: string index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "./json/decoder.py", line 368, in raw_decode File "./json/scanner.py", line 32, in _scan_once StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/stephen/Library/Application Support/Sublime Text 3/Packages/Titanium Build/Titanium.py", line 196, in select_ios_target self.load_ios_sdk_info() File "/Users/stephen/Library/Application Support/Sublime Text 3/Packages/Titanium Build/Titanium.py", line 344, in load_ios_sdk_info info = json.loads(result.decode('utf-8')) File "./json/init.py", line 319, in loads File "./json/decoder.py", line 352, in decode File "./json/decoder.py", line 370, in raw_decode ValueError: No JSON object could be decoded
If I run the command it appears to be running, titanium info --types ios --output json I get back a valid json structure
getting same error as @REBELinBLUE on mac osx 10.8.5 st3
Titanium Build hasn't been updated for 3.4.0 yet, I'm assuming this is the issue, I will be looking at it and hopefully fixing it later today, I will post back with my results this evening.
It could also be an issue with Xcode 6, either way I will check it out for both situations.
Well I don't have Xcode 6 installed. Latest 5 series here.
Which versions of Titanium CLI and SDK are you using?
Not in front of the machine right now. But I believe I got the latest version of sdk before 3.4.0 I read about 3.4.0 this morning and I didn't update. As for the cli everything was uptodate to the state before 3.4.0 sdk release. Not sure. Could give more details tomorrow morning.
Hmmm, so it was working for both of you and then all the sudden stopped? Or it has never worked?
On my local machine I'm running:
Sublime Text 3, Build 3065 Xcode 5.1.1 (build 5B1008) with iOS SDK 7.1 Titanium Studio, build: 3.3.0.201407100905 Titanium CLI: 3.3.0 Titanium SDK: 3.3.0.GA Alloy: 1.4.1 Node: v0.10.30
My plan for this weekend was to update Titanium Build to work with 3.4.0 and Xcode 6 to get it working with the new software, but it sounds like you guys are having trouble with the regular configuration?
It has never worked. Been checking it out for the first time after tasting the ide horror. well the configuration is identical. i had an oldest node version (0.10.13) but i upgraded to 0.10.32 (latest stable). Error still persists. i can choose ios simulator but then the error appears. only change i did in sublime user config for package was to set dir for cli at /usr/local/bin instead of proposed /usr/bin pls notice that the project runs fine from commandline using the cli
Exactly the same, I only installed it a few days ago after getting fed up with the IDE. I don't know the exact versions off hand bit will confirm on monday when I am at my computer
Sublime Text 3, Build 3065 Xcode 6.0.1 (build 6A317) Titanium CLI: 3.4.0-rc4 Titanium SDK: 3.4.0.v20140918202513 Alloy: 1.5.0-rc2 Node: v0.10.21
@asartz so I'm not quite sure why your's isn't working at the moment, I thought it was related to 3.4.0 cli update but that doesn't appear to be the issue in your case.
@REBELinBLUE your's is exactly what I was expecting to be the problem, I still need to update the code to handle 3.4.0. I held off on the update this weekend to see if we could get more info on your systems. So a fix is coming for your situation but unfortunately I will be out of town this week and unable to work on it. Luckily this script is just a convenience script for the actual Titanium CLI, so hopefully that can tide you over for now.
Thanks, that is exactly what I have been doing
So I updated to Xcode 6 but kept Xcode 5.1.1 around to use with older SDK builds.
I am unable to recreate this bug with any of my builds. I can build my 3.1.3.GA projects with Xcode 5 using the usual interface and my 3.4.0.GA projects using the same interface. Everything appears to be working as expected. I've tried uninstalling and reinstalling the package, no difference, so it appears that I have something setup that you guys don't and I'm not sure what it is at the moment.
Is there any more information you guys can give me on your setups?
It seems the error occurs when node can't be found. Titanium.py at line 343:
result, error = process.communicate()
Communicate() only returns an error env: node: No such file or directory while leaving result empty which causes the ValueError: No JSON object could be decoded exception when it's decoded as JSON.
My node install is located at /usr/local/bin/node. Everything runs just fine after I created a node symlink at /usr/bin/node.
sudo ln -s /usr/local/bin/node /usr/bin/node
That did indeed work for me
I've exactly the same bug "ValueError: No JSON object could be decoded"
Any solution ? :/
The symlink worked for me
As much for me, the symlink worked for me too :+1:
I confirm, the symlink does the trick. Not sure exactly why tho...