trigger.io [Error 5] Access is denied - trigger.io

I just recently updated to the new version of forge, did not change anything on my setting and when I went to build my app I got an error that said it could not find the file..
so I made the copy of aapt file and put it in a directory where trigger said it was looking (the docs said trigger.io should have moved this file for me already but Im guessing it did not)
After I moved this file and ran the build again it looked like it found the file but now I get [Error 5] Access is denied.
I have checked the permissions on the folder as I am the admin and I have full permissions and I have launched trigger as an administrator and still nothing.
Thanks.

So again from what I can tell this is a problem with the python script that calls aapt.
When you look at the script it points only to aapt, this means its looking for a directory and not the aapt.exe file itself so the first thing that happens is
1) forge says it cant find the aapt directory, this is why you are getting the error message "cant find aapt tool"
2) by adding the directory you would get the access denied because then the script is trying to run all these commands on just the directory (this was the problem I ran into), by making the change below you do not need to create a directory, just leave everything how it is but add the exe and it should work
After doing some testing I found that by adding .exe to the pythong script in android_tasks.py the build was able to run successfully
if you look on line 35 of android_tasks.py and change 'appt' to 'appt.exe' it should build for you
this is what it looks like for me
path.join(sdk, 'build-tools', '*','aapt.exe')
Hope this helps

Related

iOS build script fails on defaults read command

I have an iOS app with a Build phase script that reads a plist file using the following command:
defaults read "/full/path/to/plist/file" CFBundleExecutable
...but it fails with the following error message:
The domain/default pair of (/full/path/to/plist/file.plist, CFBundleExecutable) does not exist
The full path of the file is correct and I double checked that the file indeed contains the key CFBundleExecutable. I also tried with other keys such as CFBundleName. Running the command both with and without .plist at the end of the full path fails.
I also ran the command in Terminal to see if it works generally, but the command fails there as well.
It turns out that macOS (or the defaults command line tool) seems to have a bug. Folders that are "special" such as Documents and Desktop act differently within the command line environment and as such I observed the following:
If Info.plist is located in a subfolder of Desktop or Documents the defaults read command will fail
As soon as you place Info.plist in any other folder (such as a Developer folder) the same defaults read command will succeed
I am not sure if this is due to the fact that both of these folders require special permissions (macOS asks if an app requests access to either of these) or if it is because they are part of iCloud Drive and perhaps there is some weird symlinking in the background.
Either way, if you run into a similar error, just try to place your project in a subfolder of ~/Developer (or any other non-default, non-special folder).

Unable to revert or restore changes in a folder mapped to a different Volume (macOS)

There's a problem with TFS everywhere plugin for Eclipse if I try to revert or restore a file under a source control and if the folder/file is mapped to a different volume than the actual project.
When I try to restore or revert it, I get an error:
java.io.IOException: Failed to rename /Users/*/*/*/*/.tf1/8/d54f18aa-bdce-4ab7-958a-01eaaf0c36c1.tmp to /Volumes/macOSData/*/*/*/*/*/some_file.cs. Check the file and directory permissions.
Log has additional line:
2018-07-31 12:44:39,814 WARN [ModalContext] (com.microsoft.tfs.util.FileHelpers) Main rename failed (source permissions problem?), trying to rename temp file back
There's no problem while I get specific version of the project, even with overriding existing files, so there permissions are fine, at least for getting files. Also, this does not happen when the file is on the same volume as the local TFS mapping.
Setting all permissions to 777 does fix the problem, but this marks all files with +x making them all "changed", making this solution unacceptable.
I tried mapping the base folder to a second drive (i.e. force creating a .tf folder on a second drive), but this doesn't help. The error will appear when I try to revert stuff on the main volume.
I tried using symlinks so the mapping stays within the same volume, but still no luck.
Is there any way to solve this? Or everything should be on the same volume?
After a whole day of digging around and poking with jshell, this appears to be a bug with File.renameTo() in Java on macOS. renameTo function silently fails without any exception even though there's no permission issue to write to the destination. This happens only when writing to a different volume.
I have submitted a pull request into TFS Everywhere repo on github with a workaround for this issue.
Anyone interested can compile plugin with this changes to get things working:
https://github.com/Microsoft/team-explorer-everywhere/pull/276

javafx native package error invoking method

I'm developing a desktop application using javafx v8.0.60. I have created an exe package with ant in netbeans 8. When I run exe file in my computer, it is installed and run without any problem.
On the other hand, when I try to install and run it on some other computer, at the end of installation, window dialog pops up:
"Error invoking method"
I click Ok. Another window pop up saying:
"Failed to launch jvm"
Davood, greetings! I had this same problem and I, like you, found no help anywhere.
I submit to you a solution, which miraculously worked for me and helped me make sense of those blasted "Error invoking method." and "Failed to launch JVM" dialogs:
Find your .jar file
It has the same name as your Project and it's in your application's installation directory under AppData\Local\{ApplicationTitle}\app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
Navigate to it's directory in command prompt
shift+Right Click any blank spot in the Explorer window and choose "Open command window here" (that's a fancy trick I recently learned; alternatively you would cd to the same directory using the command prompt)
Run your .jar via the command line
type java -jar "HelloWorld.jar" and hit Enter
Tadah! Behold your hidden exceptions (the existence of which "Error invoking method." so vaguely tries to communicate to you). *
If your problem is similar to mine it stems from a file structure difference between the project out folder and the installation directory, and that's why the program compiles just fine in the editor and builds just fine—there isn't a problem until it's built out, and the file structure is a little different.
*If you didn't get anything when you ran it via the command line, look for any errors that could be happening during that initialize() method; that's where your problem likely is. You can expose any exceptions during runtime by using a Popup Exception Dialog like shown in a similar problem, here.

Incremental build on iOS is not working

Using VS2015 RTM together with remotebuild#1.0.1, I have the problem that the incremental build is not working. The problem is that the changed web resources are not updated in the remote-builds directory on the Mac.
I assume the problem is that the uploaded upload_xxxx.tgz contains an empty www folder. Currently, I know 2 workarounds:
stop and restart the remotebuild
rebuild in Visual Studio
Both alternatives I do not like. They are easy to forget, and they take a lot of time.
Is there a solution to the problem - or a better workaround?
Until the product team fixes the bug, you can patch a nodejs file as follows:
Open File Explorer and Navigate to %APPDATA%\npm\node_modules\vs-tac\lib\
Replace file remoteBuild.js with one from here
Note: if you are not using default npm installation location, then to find out the directory where remoteBuild.js is located, run “npm config get prefix” (from a command prompt) to get the base of the directory, “C:\Users\AppData\Roaming\npm” for me, and then replace “\node_modules\vs-tac\lib\remoteBuild.js”.
So I think the iosRemoteLaunch.js also needs to be updated, to reflect the new method name of httpOptions vs httpOptionsAsync. If you dont, you end up getting this little gem:
TypeError: undefined is not a function
at invokeUrl (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\lib\iosRemoteLaunch.js:31:24)
at Object.remote.debug (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\lib\iosRemoteLaunch.js:57:12)
at C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\emulator.js:37:27
at _fulfilled (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:749:13)
at C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:557:44
at flush (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)

Trigger.IO Forge error on web compile 'Cannot create a file when that file already exists'

this was working fine till now but suddenly i got this error everytime on trigger toolkit while trying to forge as a web application
[ERROR] [Error 183] Cannot create a file when that file already exists: u'development\\web'
what could be wrong?
I have experienced this before on Windows. It has to do with the OS not being able to delete the folders for the last working environment. While I don't know why this happens, I can fix it by navigating to the /development folder and removing the /web folder. Once removed, you can run the process.

Resources