Vue js cannot pick up the proper loader - vue.js

I'm not a fronend developer and pretty new to vue js, so please do not judge me :)
I'm trying to deploy my frontend application (vue3) using docker and docker-compose
and unfortunately facing the following issue...
Once docker container with my app is starting, I receive following error
ERROR in ../../bin/busybox 1:0
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
full error:
[77%] sealing (module and chunk tree optimization)
[78%] sealing (after module and chunk tree optimization)
[78%] sealing (chunk modules optimization)
[79%] sealing (after chunk modules optimization)
[80%] sealing (module reviving)
[80%] sealing (module reviving RecordIdsPlugin)
[80%] sealing (module reviving)
[80%] sealing (before module ids)
[81%] sealing (module ids)
[81%] sealing (module ids NamedModuleIdsPlugin)
[81%] sealing (module ids)
[82%] sealing (module id optimization)
[82%] sealing (module id optimization)
[83%] sealing (chunk reviving)
[83%] sealing (chunk reviving RecordIdsPlugin)
[83%] sealing (chunk reviving)
[83%] sealing (before chunk ids)
[84%] sealing (chunk ids)
[84%] sealing (chunk ids NamedChunkIdsPlugin)
[84%] sealing (chunk ids)
[85%] sealing (chunk id optimization)
[85%] sealing (after chunk id optimization)
[86%] sealing (record modules)
[86%] sealing (record modules RecordIdsPlugin)
[86%] sealing (record modules)
[87%] sealing (record chunks)
[87%] sealing (record chunks RecordIdsPlugin)
[87%] sealing (record chunks)
[87%] sealing (module hashing)
[88%] sealing (code generation)
[89%] sealing (runtime requirements)
[89%] sealing (hashing)
[90%] sealing (after hashing)
[91%] sealing (record hash)
[91%] sealing (module assets processing)
[92%] sealing (chunk assets processing)
[92%] sealing (asset processing)
[92%] sealing (asset processing copy-webpack-plugin)
[92%] sealing (asset processing HotModuleReplacementPlugin)
[92%] sealing (asset processing ESLintWebpackPlugin_1)
[92%] sealing (asset processing PersistentChildCompilerSingletonPlugin)
[92%] sealing (asset processing HtmlWebpackPlugin)
[92%] sealing (asset processing)
[93%] sealing (after asset optimization)
[94%] sealing (recording)
[94%] sealing (recording HotModuleReplacementPlugin)
[94%] sealing (recording)
[94%] sealing (after seal)
[95%] emitting (emit)
[98%] emitting (after emit)
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
ERROR Failed to compile with 1 error2:30:17 PM
error in ../../bin/busybox
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
Build finished at 14:30:17 by 0.000s
ERROR in ../../bin/busybox 1:0
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
webpack compiled with 1 error
According to this article 'You may need an appropriate loader to handle this file type.' in Vue.js project , I need to add some loaders for different file extensions, (i have only vue / js files / html / + images (.ico, .svg, .png, .jpg) and some .yaml and jenkinsfile files )
so to my vue.config.js I added this snippet as well
configureWebpack: {
module: {
rules: [
{ test: /\.(png|jpg|svg)$/, use: ['file-loader?name=./images/[name].[ext]'] },
{ test: /\.node$/, use: "node-loader"},
{ test: /\.ts$/, loader: "ts-loader" },
{ test: /\.ya?ml$/, use: 'yaml-loader'}
],
}
},
All loaders, mentioned at configuration is installed
But it does not help, because the error does not going away..
Any solutions / advices / tips or other help would be appreciated

Related

Error occurred during initialization of boot layer - javafx.controller in NetBeans

So, I'm attempting to build a simple JavaFX application in Apache Netbeans 11.1 using the non-modular from IDE instructions from this site:
https://openjfx.io/openjfx-docs/
I'm using JDK 13 and JavaFX 13.
The instructions work up until the point when they tell you to modify the VM options under Properties --> Run. I add the --module-path and --add-modules arguments as indicated, but still get an error:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets\run.xml:68: Java returned: 1
BUILD FAILED (total time: 0 seconds)
Ant set to Verbose using Tools-->Options-->Java-->Ant, verbosity level set to verbose.
Output with verbose:
Detected Java version: 13 in: D:\Programs\JavaStuff\jdk-13
Detected OS: Windows 10
Trying to override old definition of task java
Trying to override old definition of task input
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/extide/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/extide/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml from a zip file
Trying to override old definition of task javac
Trying to override old definition of task delete
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans-11.1/netbeans/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml from a zip file
parsing buildfile C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets\run.xml with URI = file:/C:/Users/BLAHBLAH/AppData/Local/NetBeans/Cache/11.1/executor-snippets/run.xml
Project base dir set to: C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets
Build sequence for target(s) `run' is [-init-paths, -init-macrodef-java-with-modules, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-modules, run]
Complete build sequence is [-init-paths, -init-macrodef-java-with-modules, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-modules, run, ]
-init-paths:
Override ignored for property "run.jvmargs"
Override ignored for property "work.dir"
Override ignored for property "application.args"
-init-macrodef-java-with-modules:
Skipped because property 'named.module.internal' not set.
-init-macrodef-java-with-unnamed-module:
creating macro call-java
-init-macrodef-java-without-modules:
Skipped because property 'modules.supported.internal' set.
run:
Executing 'D:\Programs\JavaStuff\jdk-13\bin\java.exe' with arguments:
'-Dfile.encoding=UTF-8'
'--module-path=D:\Programs\JavaStuff\javafx-sdk-13\lib\'
'--add-modules=javafx.controls,javafx.fxml'
'-classpath'
'D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx-swt.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.base.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.controls.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.fxml.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.graphics.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.media.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.swing.jar;D:\Programs\JavaStuff\javafx-sdk-13\lib\javafx.web.jar;C:\Users\BLAHBLAH\OneDrive\Documents\NetBeansProjects\HelloFX1\build\classes'
'--module-path'
'C:\Users\BLAHBLAH\OneDrive\Documents\NetBeansProjects\HelloFX1\build\classes'
'hellofx.HelloFX'
The ' characters around the executable and arguments are
not part of the command.
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\BLAHBLAH\AppData\Local\NetBeans\Cache\11.1\executor-snippets\run.xml:68: Java returned: 1
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:566)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
BUILD FAILED (total time: 0 seconds)
Any ideas?
I appreciate the responses I received - they helped me to do more research and document a solution thoroughly for myself, my colleagues, and my students.
So, I hope that this will help others who are receiving similar errors and issues while trying to install OpenJDK, NetBeans 11.1, OpenJFX (Open JavaFX), and Scene Builder.
I uploaded a PDF and sample projects to which I refer in said PDF, to the following repository:
https://github.com/profjpbaugh/apache-netbeans-openjdk-openjfx
Thanks!

Crashlytics Generate Symbols gradle step fails: GC Overhead Limit Exceeded

I'm converting a project from gradle version 3.3 to 4.10.1. This project is mostly C++ code built using a custom build step - not CMake (externalNativeBuild) or Android.mk(ndkBuild). It produces the following libraries:
armeabi-v7a unstripped: 883.2MB
arm64-v8a unstripped: 864.6MB
armeabi-v7a stripped: 15.6MB
arm64-v8a stripped: 23.9MB
The build process fails at the crashlyticsGenerateSymbolsGoogleDistribution step, with the error OutOfMemoryError: GC Overhead Limit Exceeded.
Is there a method or argument for providing more memory to the crashlytics plugin step?
The top level gradle.properties file contains the following jvm args:
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m - though I have tried as much as org.gradle.jvmargs=-Xmx12g:MaxPermSize=2g. No changes to these values seem to affect the crashlyticsGenerateSymbols step.
If I run an assembleGoogleDistribution build, skipping the crashlytics step, the build completes with no issues.
Build stack trace:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':application:crashlyticsGenerateSymbolsGoogleDistribution'.
> GC overhead limit exceeded
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':application:crashlyticsGenerateSymbolsGoogleDistribution'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.interleaveRanges(DwarfDataParser.java:321)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processChildDebugInfoEntries(DwarfDataParser.java:275)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.processCompilationUnit(DwarfDataParser.java:194)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.readCompilationUnit(DwarfDataParser.java:173)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.readCompilationUnit(DwarfDataParser.java:139)
at com.crashlytics.tools.utils.dwarf.DwarfDataParser.parse(DwarfDataParser.java:62)
at com.crashlytics.tools.utils.elf.ElfDataParser.parseElf(ElfDataParser.java:131)
at com.crashlytics.tools.utils.elf.ElfDataParser.parse(ElfDataParser.java:101)
at com.crashlytics.tools.utils.elf.ElfDataParser.parse(ElfDataParser.java:39)
at com.crashlytics.tools.android.project.codemapping.csym.ElfCSymFactory.createCSymFromFile(ElfCSymFactory.java:99)
at com.crashlytics.tools.android.project.codemapping.csym.NdkCSymGenerator.generateCodeMappings(NdkCSymGenerator.java:70)
at com.crashlytics.tools.android.project.CSymManager.generate(CSymManager.java:96)
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:692)
at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
at com.crashlytics.tools.android.DeveloperTools.gradleMain(DeveloperTools.java:292)
Gradle and Java info:
./gradlew --version
------------------------------------------------------------
Gradle 4.10.1
------------------------------------------------------------
Build time: 2018-09-12 11:33:27 UTC
Revision: 76c9179ea9bddc32810f9125ad97c3315c544919
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_121 (Oracle Corporation 25.121-b13)
OS: Mac OS X 10.13.6 x86_64
top level build.gradle
...
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'io.fabric.tools:gradle:1.31.0'
}
}
...
application build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
...
crashlytics {
enableNdk true
androidNdkOut './../../../build/crashlytics'
androidNdkLibsOut './../../../build/crashlytics/lib'
}
...
dependencies {
// Crashlytics Kit
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1#aar') {
transitive = true
}
// NDK Kit
implementation('com.crashlytics.sdk.android:crashlytics-ndk:2.1.0#aar') {
transitive = true
}
}
...
(I have confirmed that the androidNdkOut path contains armeabi-v7a and arm64-v8a folders which contain our unstripped libnative.so files, and androidNdkLibsOut contains the same folders with our stripped libnative.so files)
How can I ensure that the crashlytics plugin is getting enough memory for its crashlyticsGenerateSymbols step so that it doesn't exceed the garbage collector overhead?
Try putting a file fabric.properties in the app directory with the following content
disableEnhancedSymbolGeneration=true
It disables DWARF information processing but retains symbols information in mapping. You will not get file names and lines in resulting stacktraces in this case. Still you will get full function names (including namespaces) instead of function addresses.
Please try to downgrade the Fabric Plugin from 1.31.0 to 1.25.4 in build.gradle
classpath 'io.fabric.tools:gradle:1.25.4'
I run into this issue and found two walk around.
1: use NDK r18 and Android Gradle plugin 3.4.2. (19 and later NDK will cause java heap issue when generate symbol for arm64-v8a)
2: use most recent NDK r21d and set linker flag -fuse-ld=lld
If use ndkBuild, set APP_LDFLAGS += -fuse-ld=lld in application.mk
Those two worked for me to get pass this issue.

ScalaJS Project: SBT dependency on Leaflet not resolved

I have a ScalaJS project built in IntelliJ with SBT in which I'd like to include a slippy map based on the Leaflet library.
I'm using ScalaJS version 0.6.19 and SBT version 0.13.7
My build.sbt is the following:
import com.lihaoyi.workbench.Plugin.{bootSnippet, updateBrowsers}
enablePlugins(ScalaJSPlugin)
workbenchSettings
name := "WeatherReport"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.11"
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.1"
,"org.scala-js" %%% "scalajs-java-time" % "0.2.2"
,"com.lihaoyi" %%% "scalatags" % "0.6.5"
,"org.webjars.npm" %%% "leaflet" % "0.7.7"
)
bootSnippet := "com.sap.demo.WeatherReport().main(document.getElementById('weatherDiv'));"
updateBrowsers <<= updateBrowsers.triggeredBy(fastOptJS in Compile)
This was all working fine until I added the last dependency on leaflet. Now SBT complains:
Error:Error while importing SBT project:
...
[info] Resolving org.eclipse.jetty#jetty-util;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-io;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-http;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-server;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016 ...
[info] Resolving org.eclipse.jetty#jetty-continuation;8.1.16.v20140903 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars.npm#leaflet_sjs0.6_2.11;0.7.7: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars.npm:leaflet_sjs0.6_2.11:0.7.7 (/Developer/Scala/weather-report/build.sbt#L13-19)
[warn] +- weatherreport:weatherreport_sjs0.6_2.11:0.1-SNAPSHOT
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.webjars.npm#leaflet_sjs0.6_2.11;0.7.7: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.webjars.npm#leaflet_sjs0.6_2.11;0.7.7: not found
[error] Total time: 1 s, completed 31-Aug-2017 10:26:54
As fas a I can tell from the leaflet entry on the WebJars website, I've got the group/artifact/version information correct.
I'm not clear on why the error message has added "_sjs0.6_2.11" to the library name. Is this because there needs to be some version of leaflet specific to ScalaJS?
Thanks
Chris W
Your are confusing Webjars, which are .jars containing .js libraries published on Maven, with Scala.js libraries, which also .jars published on Maven, but containing Scala.js' .sjsir files.
Depending on the JS libraries in Webjars is typically done with jsDependencies in a Scala.js sbt build, not with libraryDependencies. Therefore, they should also use % instead of %%%. For example:
jsDependencies += "org.webjars.npm" % "leaflet" % "0.7.7" / "dist/leaflet.js"
Now you will probably also want Scala.js facades to talk to Leaflet using static types. Fortunately for you, such a facade library already exists. Since a facade library is a Scala.js library (as opposed to a JS library in a Webjar), that would be specified in libraryDependencies, with %%%. However it seems that that particular library is not (yet) published on Maven Central, so you might have to locally publish it yourself.

IntelliJ runs Gradle tasks before commit. How to stop that?

I have added a small example task to the gradle.build in one of the folders of the project:
task fail {
println "ready to fail..."
throw(new Exception("This should not be reached!"))
}
When I am trying to commit this very gradle.build file, it fails with the message:
9:53 Commit failed with error
0 files committed, 1 file failed to commit: A useful commit transaction abort!
rollback completed
abort: The system cannot find the file specified
When I am looking into the log, I see there:
Caused by: java.lang.Exception: This should not be reached!
...
2017-07-19 10:22:55,233 [ 247646] INFO - .BaseProjectImportErrorHandler - Failed to import Gradle project at 'C:/Users/543829657/workspace/dev.appl.ib.cbl' org.gradle.tooling.BuildException: Could not run build action using Gradledistribution 'https://services.gradle.org/distributions/gradle-3.2.1-bin.zip'.
Caused by: org.gradle.internal.exceptions.LocationAwareException: Build file 'C:\Users\543829657\workspace\dev.appl.ib.cbl\application\build.gradle' line: 276
...
Caused by: java.lang.Exception: This should not be reached!
...
And, surprisingly, at the end of the log appears that strange message about the lost file:
2017-07-19 10:23:05,307 [ 257720] INFO - ea.execution.HgCommandExecutor - hg.exe commit
--logfile C:\Users\543829657\.IntelliJIdea2017.1\system\.hg4idea-commit.tmp application\build.gradle
2017-07-19 10:23:07,655 [ 260068] INFO - ea.execution.HgCommandExecutor - transaction abort!
rollback completed
abort: The system cannot find the file specified
2017-07-19 10:24:38,784 [ 351197] INFO - ea.execution.HgCommandExecutor - hg.exe incoming
2017-07-19 10:24:49,856 [ 362269] INFO - ea.execution.HgCommandExecutor - hg.exe outgoing
2017-07-19 10:27:32,259 [ 524672] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Program Files/Java/jdk1.8.0_72
2017-07-19 10:27:32,299 [ 524712] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Program Files/Java/jdk1.8.0_72
2017-07-19 10:27:32,319 [ 524732] INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: -Didea.version=2017.1.5
-Didea.resolveSourceSetDependencies=true
-Pandroid.injected.build.model.only=true
-Pandroid.injected.build.model.only.advanced=true
-Pandroid.injected.invoked.from.ide=true
-Pandroid.injected.studio.version=2017.1.5.0.0 --init-script C:\Users\543829657\AppData\Local\Temp\ijinit.gradle
2017-07-19 10:27:33,554 [ 525967] INFO - ntellij.analysis.SonarLintTask - Running SonarLint Analysis for 'build.gradle'
2017-07-19 10:27:33,751 [ 526164] INFO - ntellij.analysis.SonarLintTask - SonarLint analysis done
2017-07-19 10:27:56,522 [ 548935] INFO - pl.ProjectRootManagerComponent - project roots have changed
2017-07-19 10:27:56,835 [ 549248] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 51ms; general responsiveness: ok; EDT responsiveness: ok
2017-07-19 10:27:56,947 [ 549360] INFO - pl.ProjectRootManagerComponent - project roots have changed
2017-07-19 10:27:56,957 [ 549370] INFO - indexing.UnindexedFilesUpdater - Unindexed files update canceled
2017-07-19 10:27:57,084 [ 549497] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 33ms; general responsiveness: ok; EDT responsiveness: ok
2017-07-19 10:27:57,328 [ 549741] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 244ms; general responsiveness: ok; EDT responsiveness: ok
2017-07-19 10:29:38,745 [ 651158] INFO - ea.execution.HgCommandExecutor - hg.exe incoming
2017-07-19 10:29:56,117 [ 668530] INFO - ea.execution.HgCommandExecutor - hg.exe outgoing
2017-07-19 10:34:38,752 [ 951165] INFO - ea.execution.HgCommandExecutor - hg.exe incoming
2017-07-19 10:34:54,816 [ 967229] INFO - ea.execution.HgCommandExecutor - hg.exe outgoing
I don't want IntelliJ to run the gradle tasks before the every commit. Also, I do not understand why "file not found" is declared as a reason for fail, instead of the real one.
Of course, really I have problems with a real task, but it is commented out for now, to hava a problem it its relatively pure state. It is a publishing task, and obviously, I don't need it running at IDE's will. Even worse, it is launched not from the correct directory and creates invalid folders because of that problem.
P.S. And of course, I have tried restart and caches invalidation.
The tasks do not get executed, only configured. Gradle distinguishes between the configuration phase, where the build script gets executed (yeah, a little bit confusing) to configure all tasks, and the execution phase, where selected tasks (from the command line and their dependencies) are executed. Any code provided in the closure after a task definition is meant to configure the task, but it is not executed during execution phase. Only task actions (defined by the task type), doFirst and doLast closures are executed during execution phase. A build.gradle file containing the task definition from your snippet will always fail, because you throw an exception in any configuration phase.
Modern IDEs integrate tools like Gradle (or Maven) to build the projects, but also for other tasks. So I assume, that a successful Gradle configuration is a requirement for a stable IntelliJ project. Since IntelliJ uses (helper) tasks to determine the tasks provided for a project, it cannot retrieve them, if the configuration phase fails. Therefor it interprets the project as corrupt. I don't know how Git is integrated in IntelliJ, but I could imagine that this integration requires a stable project. I guess you could compare the failing configuration phase of a Gradle project with an unparsable Maven pom.xml file.
I don't know how your real publishing task is defined, but I could imagine that you did the same mistake by putting execution code into the configuration closure, causing the task to be "executed" on each Gradle invocation, even on commit via IntelliJ.
task myTask() {
// Executed when the task is defined, everytime you run gradle
println 'Configuration phase'
doLast {
// Executed on task execution, only if the task is specified (CMD or task dependency)
println 'Execution phase'
}
}
Please note, that Gradle has a deprecated feature, which may have caused this phase confusion. You can (but you should not) define a task with the << operator, which automatically creates a doLast closure:
task myDeprecatedTask << {
println 'Execution phase'
}

Intellij IDEA + SBT: skip download errors for non-existing Sources/Javadocs

In Intellij IDEA (2016), with Download: Sources and Javadocs enabled, (can't insert image inline due to lack of reputation)
SBT will attempt to download Sources and Javadocs for all dependencies, whether or not they exist.
Problem is, when a dependency (or worse, nested dependency) does not have a Source/Javadoc, the build will fail.
Is there any way to configure IDEA/SBT to check and skip downloading Sources/Javadocs if it does not exist, or ignore errors when downloading Sources/Javadocs, without having to append
withSources() withJavadoc()
to every dependency?
For example, a dependency relying on Antlr 2.7.7, which does not have Javadocs (antlr-2.7.7-javadoc.jar) in Maven Central (https://repo1.maven.org/maven2/antlr/antlr/2.7.7/), with Download: Javadoc enabled, will return error:
SBT project import
[warn] [FAILED ] antlr#antlr;2.7.7!antlr.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\Daniel\.ivy2\local\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-javadoc.jar
[warn] ==== activator-launcher-local: tried
[warn] C:\Users\Daniel\.activator\repository\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== activator-local: tried
In Idea Settings > Build ... > Build Tools > sbt: uncheck Download Library sources and sbt sources