Longjohn build fail Titanium

152 views Asked by At

Since yesterday I can't build a project on titanium anymore... Plus my Titanium studio don't recognize my android devices when they are pluged..

THE error :

c:\Users\support\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:184
    e.stack;
     ^
processImmediate [as _immediateCallback] (timers.js:358:17)

Or some similar ones, depending on if I launch build from ti build or the green button ( only with mobile web selected because no android device detected )

What is longjohn.js ? ...

I've tried a lot of things such as :

  • Uninstall/install back Titanium studio
  • Uninstall/install back SDK(s)
  • Uninstall/install back Node.js
  • Use at least 6 differents version of Node.js with nvm
  • Update JAVA
  • Clean project
  • Create new project and launch it ( same issue )

I also tried with this tutorial to install Titanium with Sublim Text ( which sounds fabulous ... ) But doesn't work :

Traceback (most recent call last):
File "C:\Users\support\AppData\Roaming\Sublime Text 3\Packages\Titanium Build\Titanium.py", line 65, in select_project self.project_sdk = self.get_project_sdk_version()
File "C:\Users\support\AppData\Roaming\Sublime Text 3\Packages\Titanium Build\Titanium.py", line 104, in get_project_sdk_version process = subprocess.Popen([self.cli, "project", "sdk-version", "--project-dir", self.project_folder, "--output=text"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "./subprocess.py", line 824, in __init__
File "./subprocess.py", line 1118, in _execute_child
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

I don't even know where i should launch build, in which file ? Didn't find the doc ^^'

Last but not the least : Where I think I failed

I was trying to change appicon.png and changed almost all .png files i found in Ressources\android AND deleted build

Maybe problem came when I deleted some files from app\asset\android\image ? But well shouldn't block a new project to build...

2

There are 2 answers

0
Seba99 On BEST ANSWER

I finnaly found out how to resolve this !

Go on your files and delete this f***ing genymotion.js !! :D in :

C:\Users\YOUR_USER_NAME\AppData\Roaming\Titanium\mobilesdk\win32\3.3.0.GA\node_modules\titanium-sdk\lib\emulators

And btw make sure you delete the -useless- "Thumbs.db" (more hidden than hidden files) when you change an image ;) ... That was my two mistakes

3
KtorZ On

Having an error with longjohn is pretty common with Titanium as longjohn.js is only a tool used by Titanium to display full stack traces of a build. When your project get an inconsistent or improbable error, you're likely to see the error propagates until it reaches the last level of the pipeline which is more or less longjohn.

Having said that, yes, you shouln't have deleted an image required by Android to build the .apk . Also, playing with your Resources folder won't have any effect (or only temporary effects) on the app; the folder is erased and replaced by Titanium when it builds; Sometimes partially, sometimes totally but you don't want to change any file in that folder.