How to fix CodenameOne build upload error - codenameone

I have been running into some issues when trying to submit a build to the server. Every time I try to submit it, it fails. Here's the output of the process :
ant -f /home/darklord/NetBeansProjects/DashboardFAES build-for-android-device
No GUI Entries available
init:
deps-clean:
Updating property file: /home/darklord/NetBeansProjects/DashboardFAES/build/built-clean.properties
Deleting directory /home/darklord/NetBeansProjects/DashboardFAES/build
refresh-libs:
Deleting directory /home/darklord/NetBeansProjects/DashboardFAES/lib/impl
clean:
copy-android-override:
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/classes
copy-libs:
deps-jar:
Updating property file: /home/darklord/NetBeansProjects/DashboardFAES/build/built-jar.properties
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/tmp
Compiling 13 source files to /home/darklord/NetBeansProjects/DashboardFAES/build/tmp
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/empty
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/generated-sources/ap-source-output
Compiling 13 source files to /home/darklord/NetBeansProjects/DashboardFAES/build/classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 1 file to /home/darklord/NetBeansProjects/DashboardFAES/build/classes
Copied 2 empty directories to 2 empty directories under /home/darklord/NetBeansProjects/DashboardFAES/build/classes
compile:
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/dist
Copying 1 file to /home/darklord/NetBeansProjects/DashboardFAES/build
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/override , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/lib/impl/cls , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/lib/impl/stubs , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/native/internal_tmp , it's a directory.
Copy libraries to /home/darklord/NetBeansProjects/DashboardFAES/dist/lib.
Building jar: /home/darklord/NetBeansProjects/DashboardFAES/dist/DashboardFAES.jar
To run this application from the command line without Ant, try:
java -jar "/home/darklord/NetBeansProjects/DashboardFAES/dist/DashboardFAES.jar"
jar:
clean-override:
build-for-android-device:
You sent an android build without submitting a keystore. Notice that you will receive a build that is inappropriate for distribution (although it could be used for debugging purposes). For further details read http://www.codenameone.com/signing.html
Sending build request to the server, notice that the build might take a while to complete!
Sending build to account: mysuperaddress#gmail.com
Response message from server is: OK
Server provided no further details
java.io.IOException: An upload error occured - check that you have enough build credits on the server
at com.codename1.build.client.BuildProcess.sendS3Build(BuildProcess.java:410)
at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:432)
at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:436)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
/home/darklord/NetBeansProjects/DashboardFAES/build.xml:300: Error in server build process
BUILD FAILED (total time: 1 minute 55 seconds)
Please help me out !

In 9 times out of 10 it means you ran out of build credits for this month which are reset every month. Notice that you can see those in the subscription tab.
In 9 times out of the remainder this is due to a bad connection/proxy configuration. You need to configure the Java proxy as well as the main process.
In the last 1 percent of the cases something might have went wrong in which case I suggest contacting us via one of our support channels.

Related

hugo builds with read-only source-tree

We would like to integrate hugo for documentation generation in our automake project.
The problem i'm facing is, that I would like to support
out-of-tree builds
builds from read-only source trees (which is related to out-of-tree builds)
out-of-tree builds kind of work with:
hugo --source $(srcdir) --destination $(abs_builddir)
However, when my source-tree is read-only (e.g. as tested by make distcheck), this fails with:
$ make
hugo --source ../../../hugo --destination "<<SRCDIR>>/project-0.1/_build/sub/hugo"
Error: add site dependencies: create deps: failed to create file caches from configuration: mkdir <<SRCDIR>>/project-0.1/hugo/resources: permission denied
Total in 1 ms
make: *** [Makefile:555: all] Error 255
Obviously, hugo tries to create it's "file caches" as a resources/ directory in the (read-only) <<SRCDIR>>.
How can I tell hugo to creat this "file caches" directory in an alternative (writeable) place?
I tried setting --cacheDir (to $(abs_builddir), but this didn't change anything.
apparently there's a resourceDir config-file option, but afaict that is not available via the cmdline (and I don't know whether it would actually help).

React Native: Deprecated Gradle features ..., making it incompatible with Gradle 7.0

I'm getting this error. It all started when I tried to make use of react-native-camera and run my project
> Task :react-native-camera:compileGeneralDebugJavaWithJavac
> Task :app:mergeDexDebug FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
252 actionable tasks: 33 executed, 219 up-to-date
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\joans\Desktop\Project\new_project\node_modules\react-native-camera\android\src\main\java\com\google\android\cameraview\Camera2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 65711 > 65536 ; # fields: 71075 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
.....
* What went wrong:
Execution failed for task ':app:mergeDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
Please, any suggestions would be helpful

Builds not appearing in build server

I am building an android apk via 'Send Android build' and it shows that the build is successful. When I go to check the build server, it shows that it's empty.. Apparently with no build.
This is output in my console:
ant -f /home/falcon/NetBeansProjects/bizapp_mobile build-for-android-device
Generating GUI sources
No GUI Entries available
init:
deps-clean:
Updating property file: /home/falcon/NetBeansProjects/bizapp_mobile/build/built-clean.properties
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/build
refresh-libs-impl:
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp
clean:
copy-android-override:
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
copy-libs:
Copying 12 files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
deps-jar:
Updating property file: /home/falcon/NetBeansProjects/bizapp_mobile/build/built-jar.properties
JavaFX Not loaded. Classpath=/home/falcon/.codenameone/designer_1.jar . Adding to classpath
Adding JavaFX to your project properties file at nbproject/project.properties
JavaFX should be correctly loaded the next time you run this project.
Restarting JVM with JavaFX in the classpath.
NOTE: If you are trying to debug the project, you'll need to cancel this run and try running debug on the project again. JavaFX should now be in your classpath.
JavaFX is loaded
Retina Scale: 1.0
Updating merge file /home/falcon/NetBeansProjects/bizapp_mobile/css/theme.css.merged
Input: /home/falcon/NetBeansProjects/bizapp_mobile/css/theme.css
Output: /home/falcon/NetBeansProjects/bizapp_mobile/src/theme.res
Acquiring lock on CSS checksums file /home/falcon/NetBeansProjects/bizapp_mobile/.cn1_css_checksums...
Lock obtained
File has not changed since last compile.
Releasing lock
CSS file successfully compiled. /home/falcon/NetBeansProjects/bizapp_mobile/src/theme.res
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/tmp
Compiling 42 source files to /home/falcon/NetBeansProjects/bizapp_mobile/build/tmp
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/empty
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/generated-sources/ap-source-output
Compiling 42 source files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 8
1 warning
Copying 2 files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
compile:
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/dist
Copying 1 file to /home/falcon/NetBeansProjects/bizapp_mobile/build
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/override , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl/cls , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl/stubs , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/${cn1.javafx.path} , it can't be read.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp , it can't be read.
Copy libraries to /home/falcon/NetBeansProjects/bizapp_mobile/dist/lib.
Building jar: /home/falcon/NetBeansProjects/bizapp_mobile/dist/BizApp.jar
To run this application from the command line without Ant, try:
java -jar "/home/falcon/NetBeansProjects/bizapp_mobile/dist/BizApp.jar"
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp
jar:
clean-override:
build-for-android-device:
BUILD SUCCESSFUL (total time: 11 seconds)
Where could I be going wrong?
EDIT
Now this is confusing...
When I ran 'Send Android build' when my PC is connected to internet, it gives that message I posted before.
So accidentally, I ran 'Send Android build' while my PC was offline and it passed that point and it showed me this pop up:
Now.. once I this pop-up shows, that's when I connect to internet and everything will flow as supposed to.
So its like, if I have internet connected right from the start, it isn't successful but if I connect to internet after showing me the popup of an invalid Android certificate, everything will work fine and the build will be in the build server.
But is causing this now?

Play Application Couldn't be Started

Recently I've been assigned for a project created with AngularJs and it uses Java Play framework to run it. I use IntelliJ-Idea IDE for the development and to run this application.
Once I clicked on "Run", it gives me following errors in the console.
'force' enabled
Will run: [gulp, --gulpfile=gulpfile.js, watch, --force] in /home/supuns/Projects/bd-business-portal/ui
java.io.IOException: Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[trace] Stack trace suppressed: run 'last compile:run' for the full output.
[error] (compile:run) java.io.IOException: Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
[error] Total time: 2 s, completed Oct 24, 2016 10:54:25 AM
Process finished with exit code 1
I can't figure out what is happening because I'm new to the environment.
UPDATE:
Sorry about the less information I have given in my question. I have globally installed gulp but still it is not working.
Here's the content of build.sbt file.
name := """bd-business-portal"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs
)
With the help of my team members I have found the reason that cause this issue is IntelliJ-Idea doesn't know the path to 'Gulp'. I'm using Ubuntu 16.04 and even though I have set the path globally it doesn't understand where to find gulp.
Therefore I have installed sbt and from the IntelliJ terminal ran the command:
sbt run
and it worked.
Update
As I had to work on multiple Play framework sbt projects, doing "sbt run" on the terminal and closing IntelliJ windows to free the port was bit hectic. Therefore I decided to find the actual path variable that created this behavior and I found the PATH variable saved in /etc/environment was "/home/supuns/.nvm/versions/node/v6.9.1/bin/gulp" and I changed it to
/home/supuns/.nvm/versions/node/v6.9.1/bin
Then the IntelliJ "Play" button worked as intended.
I also faced the same issue. I fixed it by installing gulp cli along with gulp. Below 2 commands fixed my problem:
npm install -global gulp-cli
npm install gulp --save-dev

Getting error when sending application to codename one build server

I have not done any build on the server before, but I have created numerous applications on my system. When trying to send this particular application to the build server, it was giving error on netbeans. This was the error I was getting:
init:
deps-clean:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-clean.properties
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
refresh-libs:
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\lib\impl
clean:
copy-desktop-override:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
copy-libs:
deps-jar:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-jar.properties
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller code size and wider device support
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\empty
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
compile:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\dist
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:990: The following error occurred while executing this line:
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute.
BUILD FAILED (total time: 0 seconds)
What could be the cause and how will I solve it?
Just remove that attribute from the XML build file, its a NetBeans bug: https://groups.google.com/d/msg/codenameone-discussions/X_HMILMsw_Y/jE0xDsL7nfAJ

Resources