Build failed with cordova android 7.0.0 and phonegap-plugin-barcodescanner 7.0.2

Build failed with cordova android 7.0.0 and phonegap-plugin-barcodescanner 7.0.2
Started with the Tutorial project for Ionic v1. Loaded the Facebook plugin (https://github.com/jeduan/cordova-plugin-facebook4) and Android compilation is fine. Added 7.0.2 Barcode scanner and now getting Dex compile errors of the form:
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I have had trouble with older versions of Ionic CLI, Facebook and BarCodeScanner in conflict, so I am suspicious it is related to that but am not sure nor know how to confirm.
Expected Behaviour
Build should succeed.
Actual Behaviour
Build fails with error
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Reproduce Scenario (including but not limited to)
Steps to Reproduce
ionic start BarCodeTest tutorial
cd BarCodeTest
ionic cordova platform add android
ionic cordova build android
cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="<redacted>" --variable APP_NAME="bookship"
ionic cordova build android (this works)
cordova plugin add phonegap-plugin-barcodescanner
npm install --save @ionic-native/barcode-scanner
ionic cordova build android (this fails)

Platform and Version (eg. Android 5.0 or iOS 9.2.1)
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
Marks-Air-2:BarCodeTest markwatkins$ ionic info
cli packages: (/Users/markwatkins/.nvm/versions/node/v8.9.4/lib/node_modules)
@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:
Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.9.4
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:
ANDROID_HOME : /Users/markwatkins/Library/Android/sdk

Misc:
backend : pro

Marks-Air-2:BarCodeTest markwatkins$ cordova plugin list
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
Marks-Air-2:BarCodeTest markwatkins$
Marks-Air-2:BarCodeTest markwatkins$ cordova --version
8.0.0
Marks-Air-2:BarCodeTest markwatkins$ cordova platforms
Installed platforms:
android 7.0.0
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
Plugin version
cordova plugin version | grep phonegap-plugin-barcodescanner

Marks-Air-2:BarCodeTest $     cordova plugin version | grep phonegap-plugin-barcodescanner
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
Sample Code that illustrates the problem
Logs taken while reproducing problem
complete log below
Marks-Air-2:Sites mw$ more foo.bash
#bash
ionic start BarCodeTest tutorial
cd BarCodeTest
ionic cordova platform add android
ionic cordova build android
cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="" --variable APP_NAME="bookship"
ionic cordova build android
cordova plugin add phonegap-plugin-barcodescanner
npm install --save @ionic-native/barcode-scanner
ionic cordova build android
Marks-Air-2:Sites mw$ ./foo.bash
✔ Creating directory ./BarCodeTest - done!
✔ Downloading and extracting tutorial starter - done!
? Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
✔ Personalizing ionic.config.json and package.json - done!

ionic integrations enable cordova --quiet
✔ Downloading integration cordova - done!
✔ Copying integrations files to project - done!
[OK] Added cordova integration!

Installing dependencies may take several minutes.
✨   IONIC  DEVAPP  ✨
Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

🔑   Test on iOS and Android without Native SDKs
🚀   LiveReload for instant style and JS updates

-->    Install DevApp: https://bit.ly/ionic-dev-app    <--

npm i
✔ Running command - done!
git init

🔥   IONIC  PRO  🔥
Supercharge your Ionic development with the Ionic Pro SDK

⚠   Track runtime errors in real-time, back to your original TypeScript
📲   Push remote updates and skip the app store queue

Learn more about Ionic Pro: https://ionicframework.com/products
? Install the free Ionic Pro SDK and connect your app?
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.ionic.starter
Name: BarCodeTest

Activity: MainActivity
Android target: android-26

Subproject Path: CordovaLib
Subproject Path: app
Android project created with<EMAIL_ADDRESS>Android Studio project detected
Android Studio project detected
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android
           This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
Installing "cordova-plugin-device" for android
Adding cordova-plugin-device to package.json
Saved plugin info for "cordova-plugin-device" to config.xml
Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project
Installing "cordova-plugin-splashscreen" for android
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for "cordova-plugin-splashscreen" to config.xml
Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project
Installing "cordova-plugin-ionic-webview" for android
Adding cordova-plugin-ionic-webview to package.json
Saved plugin info for "cordova-plugin-ionic-webview" to config.xml
Discovered plugin "cordova-plugin-ionic-keyboard" in config.xml. Adding it to the project
Installing "cordova-plugin-ionic-keyboard" for android
Adding cordova-plugin-ionic-keyboard to package.json
Saved plugin info for "cordova-plugin-ionic-keyboard" to config.xml
--save flag or autosave detected
Saving<EMAIL_ADDRESS>into config.xml file ...

ionic cordova resources android --force
✔ Collecting resource configuration and source images - done!
✔ Filtering out image resources that do not need regeneration - done!
✔ Uploading source images to prepare for transformations - done!
✔ Generating platform resources: 18 / 18 complete - done!
✔ Modifying config.xml to add new image resources - done!
Running app-scripts build: --platform android --target cordova
[16:37:02]  build dev started ...
[16:37:02]  clean started ...
[16:37:02]  clean finished in 3 ms
[16:37:02]  copy started ...
[16:37:02]  deeplinks started ...
[16:37:02]  deeplinks finished in 48 ms
[16:37:02]  transpile started ...
[16:37:08]  transpile finished in 6.08 s
[16:37:08]  preprocess started ...
[16:37:08]  preprocess finished in less than 1 ms
[16:37:08]  webpack started ...
[16:37:08]  copy finished in 6.35 s
[16:37:19]  webpack finished in 10.59 s
[16:37:19]  sass started ...
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[16:37:20]  sass finished in 1.65 s
[16:37:20]  postprocess started ...
[16:37:20]  postprocess finished in 11 ms
[16:37:20]  lint started ...
[16:37:20]  build dev finished in 18.55 s
cordova build android
Android Studio project detected

ANDROID_HOME=/Users/mw/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
studio
:wrapper
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
[16:37:27]  lint finished in 6.39 s
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_1jyq10tezdufy71arrq2cemip.run(/Users/mw/Sites/BarCodeTest/platforms/android/app/build.gradle:143)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript
NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:compileDebugNdk
NO-SOURCE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders
:app:processDebugJavaRes NO-SOURCE
:app:validateSigningDebug
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugSources
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
:app:transformDexArchiveWithDexMergerForDebug
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:transformResourcesWithMergeJavaResForDebug
:app:packageDebug
:app:assembleDebug
:app:cdvBuildDebug
BUILD SUCCESSFUL in 10s
47 actionable tasks: 47 executed
Built the following apk(s):
/Users/mw/Sites/BarCodeTest/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Installing "cordova-plugin-facebook4" for android
Android Studio project detected
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-facebook4 to package.json
Saved plugin info for "cordova-plugin-facebook4" to config.xml
Running app-scripts build: --platform android --target cordova
[16:38:01]  build dev started ...
[16:38:01]  clean started ...
[16:38:01]  clean finished in 9 ms
[16:38:01]  copy started ...
[16:38:02]  deeplinks started ...
[16:38:02]  deeplinks finished in 34 ms
[16:38:02]  transpile started ...
[16:38:08]  transpile finished in 6.18 s
[16:38:08]  preprocess started ...
[16:38:08]  preprocess finished in 1 ms
[16:38:08]  webpack started ...
[16:38:08]  copy finished in 6.41 s
[16:38:16]  webpack finished in 8.60 s
[16:38:16]  sass started ...
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[16:38:18]  sass finished in 1.37 s
[16:38:18]  postprocess started ...
[16:38:18]  postprocess finished in 7 ms
[16:38:18]  lint started ...
[16:38:18]  build dev finished in 16.44 s

cordova build android
Android Studio project detected

ANDROID_HOME=/Users/mw/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_1jyq10tezdufy71arrq2cemip.run(/Users/mw/Sites/BarCodeTest/platforms/android/app/build.gradle:143)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:checkDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:prepareLintJar
UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE
:CordovaLib:generateDebugResources
UP-TO-DATE
:CordovaLib:packageDebugResources
UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources
UP-TO-DATE
:CordovaLib:javaPreCompileDebug
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
UP-TO-DATE
:app:preBuild
UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
UP-TO-DATE
:app:checkDebugManifest
UP-TO-DATE
:app:generateDebugBuildConfig
UP-TO-DATE
:app:prepareLintJar
UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
[16:38:23]  lint finished in 5.46 s
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
Note: /Users/mw/Sites/BarCodeTest/platforms/android/app/src/main/java/org/apache/cordova/facebook/ConnectPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
:app:transformDexArchiveWithDexMergerForDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:processDebugJavaRes
NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug
:app:validateSigningDebug
:app:packageDebug
:app:assembleDebug
:app:cdvBuildDebug
BUILD SUCCESSFUL in 22s
47 actionable tasks: 17 executed, 30 up-to-date
Built the following apk(s):
/Users/mw/Sites/BarCodeTest/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Installing "phonegap-plugin-barcodescanner" for android
Android Studio project detected
Subproject Path: CordovaLib
Subproject Path: app
Adding phonegap-plugin-barcodescanner to package.json
Saved plugin info for "phonegap-plugin-barcodescanner" to config.xml

<EMAIL_ADDRESS>added 1 package in 5.727s
Running app-scripts build: --platform android --target cordova
[16:39:09]  build dev started ...
[16:39:09]  clean started ...
[16:39:09]  clean finished in 3 ms
[16:39:09]  copy started ...
[16:39:09]  deeplinks started ...
[16:39:09]  deeplinks finished in 24 ms
[16:39:09]  transpile started ...
[16:39:14]  transpile finished in 5.29 s
[16:39:14]  preprocess started ...
[16:39:14]  preprocess finished in less than 1 ms
[16:39:14]  webpack started ...
[16:39:14]  copy finished in 5.53 s
[16:39:23]  webpack finished in 8.90 s
[16:39:23]  sass started ...
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[16:39:24]  sass finished in 1.42 s
[16:39:24]  postprocess started ...
[16:39:24]  postprocess finished in 8 ms
[16:39:24]  lint started ...
[16:39:24]  build dev finished in 15.87 s

cordova build android
Android Studio project detected

ANDROID_HOME=/Users/mw/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_1jyq10tezdufy71arrq2cemip.run(/Users/mw/Sites/BarCodeTest/platforms/android/app/build.gradle:144)

:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:checkDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources
UP-TO-DATE
:CordovaLib:javaPreCompileDebug
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
UP-TO-DATE
:CordovaLib:packageDebugRenderscript
NO-SOURCE
:app:compileDebugRenderscript
UP-TO-DATE
:app:checkDebugManifest
UP-TO-DATE
:app:generateDebugBuildConfig
UP-TO-DATE
:app:prepareLintJar
UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
UP-TO-DATE
:app:mergeDebugResources
[16:39:31]  lint finished in 6.39 s
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders
UP-TO-DATE
:app:generateDebugAssets
UP-TO-DATE
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Get more help at https://help.gradle.org

BUILD FAILED in 14s
38 actionable tasks: 11 executed, 27 up-to-date
(node:92159) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/mw/Sites/BarCodeTest/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Get more help at https://help.gradle.org

BUILD FAILED in 14s
(node:92159) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Marks-Air-2:Sites mw$
Marks-Air-2:BarCodeTest mw$ ionic info
cli packages: (/Users/mw/.nvm/versions/node/v8.9.4/lib/node_modules)
@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:
Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.9.4
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:
ANDROID_HOME : /Users/mw/Library/Android/sdk

Misc:
backend : pro

Marks-Air-2:BarCodeTest mw$ cordova plugin list
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
Marks-Air-2:BarCodeTest mw$

I get essentially the same error when trying cordova 6.4.0 as well, e.g. start a new project with the same steps except
ionic cordova platform add<EMAIL_ADDRESS>get same error.
Any suggestions greatly appreciated! A few other issues may be duplicates, I have tried the suggested workarounds there as well and none seem to be working for me (e.g. https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/535 and https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/595

btw I faced a similar issue with older versions about 8 months ago - the attached discussion on this issue (https://github.com/jeduan/cordova-plugin-facebook4/issues/507) indicates the problem is with barcodescanner and not facebook plugin. I'm not enough of an Android person to say but lots of investigative detail there...

I have the same issue. When both barcode and facebook4 run in isolation, build fails. When used separately without the other, build succeeds. I tried many versions of facebook4 plugin and found, on cli-8.0.0 with facebook4 version 1.7.4 and with the latest on barcode, build succeeds.

Thanks wizajay. That worked fine. I just removed the current version:
ionic cordova plugin remove cordova-plugin-facebook4
and put on the 1.7.4 version
ionic cordova plugin add<EMAIL_ADDRESS>and it all compiled fine

@viking2917 the facebook plugin includes the facebook sdk which includes a library that is used by many other Android SDK's. This is what is causing the Unable to merge dex error. I don't currently have a work around other than using an older version of the Facebook plugin that uses an older version of the Facebook SDK.

Thanks @macdonst; appreciate you looking into it. Like others I am using the @1.7.4 version with success for the moment.

Oy, thats not good.  facebook4 is up to 1.9.1 - so it will be several revs behind.
Have you tried using cordova-android-support-gradle-release to align your SDK's?

@rolinger thanks for the suggestion; looks promising, except that I use the push plugin which the gradle-release plugin suggests will cause it problems. So I have not actually tried it.

Hello,
in my case, barcodescanner plugin has started blocking android project compilation suddenly. I used it for days without any problem and in a certain point it started hanging on transformDexArchiveWithExternalLibsDexMergerForDebug.
I haven't installed anything, no other plugins, nor the facebook plugin.

I had the same experience as @studiostart, this started breaking without any apparent changes on my part and my previous workaround of using 1.7.4 of the Facebook plugin does not help. I took the same steps as @studiostart, more specifically I deleted
compile 'com.android.support:support-v4:+'
from the file
<projectroot>/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner.gradle
and then did
ionic cordova platform remove android
ionic cordova platform add android

And that seemed to fix the issue. I am too much of an Android n00b to know whether this causing some other problem I haven't though of, or whether this would make an appropriate pull request....
@macdonst do you think this is a hack or a general solution?

@viking2917  it's not work for me , when i remove it ..
that's the result when i try to add platform android :
✖ Uploading source images to prepare for transformations - failed!
Error: connect ETIMEDOUT <IP_ADDRESS>:443
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) .
any solution ?
thanks in advance

@viking2917 it worked for me, thanks!

I am running into the same issue.  Building Android fails after I add the barcode scanner plugin.  @viking2917 's solution worked for me.
terminal log:
:processDebugResources/Users/jfhome/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/0d888cdbfc407d3d5333be4b445453bd/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/jfhome/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/0d888cdbfc407d3d5333be4b445453bd/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/Users/jfhome/devProjects/ircscanner/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:141: error: resource android:attr/fontVariationSettings not found.
/Users/jfhome/devProjects/ircscanner/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:141: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt```

plugins:
```cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"```

Ionic CLI 3.10.1
Cordova 8.0.0
Android Platform version: 7.0.0

I found a note on Android's Documentation:

> Note: Prior to Support Library revision 24.2.0, there was a single v4 support library. That library was divided into multiple modules to improve efficiency. For backwards compatibility, if you list support-v4 in your Gradle script, your APK will include all of the v4 modules. However, to reduce APK size, we recommend that you just list the specific modules your app needs.
ref: https://developer.android.com/topic/libraries/support-library/packages.html

Perhaps specifying which v4 modules this plugin depends on will be a better fix then simply removing v4 completely?

@jfbloom22 that works for me too :)

@jfbloom22 thanks it's working wow......

@jfbloom22 that works for me too :)
In my case
Cordova 8.0.0
Cordova Android Platform version: 7.1.0

@jfbloom22  excelente solución, muchas gracias

@jfbloom22 Nice find. Thanks.
For PGB, I forked this plugin repo and edited the gradle file as @jfbloom22 had mentioned and using it instead. But still FB plugin works only with version 1.7.4
https://github.com/slickalpha/phonegap-plugin-barcodescanner/commit/177bcd04e209a85dcb5d838ea9997101336c4335
<plugin spec="https://github.com/slickalpha/phonegap-plugin-barcodescanner.git" source="git">
	<param name="CAMERA_USAGE_DESCRIPTION" value="To scan barcodes" />
</plugin>
<plugin name="cordova-plugin-facebook4" spec="1.7.4" source="npm">
	<param name="APP_ID" value="your_app_id" />
	<param name="APP_NAME" value="your_app_name" />
</plugin>

Hope to see a permanent solution to this issue.

Latest version 7.0.3 with commit #621 fix this problem

When I try to use this fixed version I get this error:

FAILURE: Build failed with an exception.
Where:
Build file '/xxx/build/mobile/platforms/android/build.gradle' line: 259
What went wrong:
A problem occurred evaluating root project 'android'.
Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org

Any ideas?

Fix for the Facebook plugin was to force the Facebook SDK to version 4.25.0.
cordova plugin add cordova-plugin-platform-replace
Then add to your config.xml
<platform name="android">
	<replace-string file="project.properties" find="regex:com\.facebook\.android\:facebook-android-sdk\:[\+0-9\.]+" replace="com.facebook.android:facebook-android-sdk:4.25.0" />
</platform>

Finally run cordova prepare android
Works with the latest 1.9.1 version of cordova-facebook-plugin4

FAILED
38 actionable tasks: 1 executed, 37 up-to-date
(node:12824) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

My conclusion
Now I have the same problem on :
ionic info
cli packages: (C:\Users\hmishyn\AppData\Roaming\npm\node_modules)
@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0 browser 5.0.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:
Node : v6.13.0
npm  : 3.10.10
OS   : Windows 10

And my plugins:
ionic cordova plugins list

cordova plugin ls
cordova-android-support-gradle-release 1.2.0 "cordova-android-support-gradle-release"
cordova-open-native-settings 1.4.1 "Native settings"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-globalization 1.0.9 "Globalization"
cordova-plugin-ionic 4.0.0 "IonicCordova"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-platform-replace 1.0.0 "Platform String Replace"
cordova-plugin-scanbot-sdk 1.6.0 "Scanbot SDK Cordova Plugin"
cordova-plugin-secure-storage 2.6.8 "SecureStorage"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 7.0.4 "BarcodeScanner"

And problem really only in BarcodeScanner !
How I know that? I delete this plugin, and after that project was built successfully => problem is with this plugin.

I have been working on fixing this issue for almost a week and Im getting nowhere. Ive tried everything and nothing makes a difference. Im literally at my wits end.
Could someone who has fixed the issue please post the versions of 'Barcode Scanner' & 'Facebook4' they are running. Along with their ionic info.
I feel like i have already tried every conceivable combination aswell as attempting to edit the barcodescanner.gradle file.
Much love and thanks to anyone who can help.
@viking2917 @jfbloom22

I am traveling but will try to post info in next day or two.
On Thu, Apr 12, 2018, 3:36 PM Hayden Cassar<EMAIL_ADDRESS>wrote:

I have been working on fixing this issue for almost a week and Im getting
nowhere. Ive tried everything and nothing makes a difference. Im literally
at my wits end.
Could someone who has fixed the issue please post the versions of 'Barcode
Scanner' & 'Facebook4' they are running. Along with their ionic info.
I feel like i have already tried every conceivable combination aswell as
attempting to edit the barcodescanner.gradle file.
Much love and thanks to anyone who can help.
@viking2917 https://github.com/viking2917 @jfbloom22
https://github.com/jfbloom22
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/606#issuecomment-380694589,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHVcVQ_4m8wMjDmv7S5Pfq8p5sTt-vu7ks5tnvXVgaJpZM4R0-aG
.

@viking2917 Thanks so much. Really appreciated.

Hello. I fixed this problem with barcode scanner on ver 7.1.0, but now I merge some branch with other plugins and it breaks again !
Now I have barcode scanner v. 7.1.1 and no “Facebook” plugin and I still get “unableToMergeDex” error. I have it ! I already spent 3-4 working days trying to solve this problem, but it happened again ! :(

On 12. Apr 2018, at 10:17, Hayden Cassar<EMAIL_ADDRESS>wrote:
@viking2917 https://github.com/viking2917 Thanks so much. Really appreciated.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/606#issuecomment-380703338, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ_fYJ0wwHYpYdJe1k1Q9bXtvXm8SMMwks5tnv-FgaJpZM4R0-aG.

@Velm14 Im the same. Ive tried every combination of versions of Facebook4 & Barcodescanner and I still get 'unableToMergeDex'. Hopefully someone can help us out. Good luck.

Now I am trying to push app to AppStore, but when I built app for IOS, I got that it doesn’t work at all. Even it does not run camera… WTF with this plugin???

On 12. Apr 2018, at 10:53, Hayden Cassar<EMAIL_ADDRESS>wrote:
@Velm14 https://github.com/Velm14 Im the same. Ive tried every combination of versions of Facebook4 & Barcodescanner and I still get 'unableToMergeDex'. Hopefully someone can help us out. Good luck.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/606#issuecomment-380712095, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ_fYCJ9xINowI_IXrDbfb4xnCKGxGLtks5tnwgIgaJpZM4R0-aG.

@hcassar93 here's my info. Happy to provide more info if you want something specific.
First, I have noted that my app and environment at least is sensitive to the order of install of the plugins. if I install barcode scanner first it barfs..
I install Facebook (v.1.7.4) (then other plugins such as Push), make sure I add the android platform after all that. then  I install other plugins, and near the the end the barcode scanner
ionic cordova plugin add<EMAIL_ADDRESS>--save --variable APP_ID="" --variable APP_NAME=""
ionic cordova plugin add<EMAIL_ADDRESS>npm install --save @ionic-native/push
.....
ionic cordova plugin add phonegap-plugin-barcodescanner;  npm install --save @ionic-native/barcode-scanner
Because of various conflicts on plugins (I think unrelated to barcode scanner), I have to edit my project.properties file to set:
cordova.system.library.4=com.google.android.gms:play-services-analytics:11.6.2
But again I think that's unrelated to the barcode scanner.
The way I got this to work, I created a clean ionic project and just tried to get it to build with no other components, googling for answers when I had problems. I just kept a log of the order I did stuff and the redid it in my project in that order.
Details:
Here's my plugin list:
(in particular,
cordova-plugin-facebook4 1.7.4 "Facebook Connect"
and
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
)
ionic cordova plugin list

cordova plugin ls
com-darryncampbell-cordova-plugin-intent 1.0.0 "Intent Shim"
com.web-mystery.cordova.openwith-ios 1.0.0 "OpenWith"
cordova-fabric-plugin 1.1.13-dev "cordova-fabric-plugin"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-apprate 1.3.0 "AppRate"
cordova-plugin-camera 4.0.3-dev "Camera"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-email-composer 0.8.15 "EmailComposer"
cordova-plugin-facebook4 1.7.4 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-globalization 1.0.9 "Globalization"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
phonegap-plugin-push 2.1.3 "PushPlugin"

output of ionic info
ionic info
cli packages: (/Users/markwatkins/.nvm/versions/node/v8.9.4/lib/node_modules)
@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:
cordova (Cordova CLI) : 8.0.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework   : ionic1 1.3.3

System:
Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.9.4
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.3 Build version 9E145

Environment Variables:
ANDROID_HOME : /Users/markwatkins/Library/Android/sdk

Misc:
backend : pro

@hcassar93 To make it work I am running:
cli packages: (/Users/rogier/DEV/embrosa_v3/node_modules)
@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:
Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.9.4
npm               : 5.7.1
OS                : macOS High Sierra
Xcode             : Xcode 9.3 Build version 9E145

cordova-plugin-facebook4 1.7.4 "Facebook Connect"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"

Hopefully this will help you?

@hcassar93 looking through trying to see if there is any pattern between the various versions of plugins and Cordova and what not.  Can you share your setup?
@ivanosire mentioned that a fix was merged into version 7.0.3.
Has anyone tried that?
This fix was similar to my solution above, but looks more correct: https://github.com/phonegap/phonegap-plugin-barcodescanner/commit/16c97b7b6d0f845282d0633e65593ac263baaa58  Basically they moved the requirement for the support v4 framework from he gradle file to plugin.xml file.  The facebook plugin also has a plugin.xml file and requires the android v4 framework.  Line 64:  <framework src="com.facebook.android:facebook-android-sdk:4.+"/>

I'm using the barcodescanner in my Ionic app (together with the facebook plugin). Here is, what I have done to get it working:

Aliging various versions of Android Suppport libraries (maybe this is optional): cordova plugin add cordova-android-support-gradle-release --fetch
I have enabled multidex: https://stackoverflow.com/a/38027917/8019885
Changed needed facebook version: https://stackoverflow.com/a/49274288/8019885
Cordova clean

I hope this helps someone!

I haven't had a lot of experience with debugging problems in this area, but following along with a tutorial I configured & deployed my app on my new phone & it worked fine.
Then added the BarcodeScanner plugin with very basic usage: launch scanner, display type & value, pop toast on error. Once satisfied with the code using ionic serve, I tried to update/deploy the code to my phone for an actual test (BarcodeScanner isn't available in the browser). That's when I got the:
 ionic run device Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
error. I ran it again & got it again. Everywhere I was seeing this error mentioned there BarcodeScanner was an installed plugin. (though the threads were in reference to facebook)
I then had to change locations (system sleep) and continued reading this post after I'd moved. I read @mgreg89 's post above anf thought: "I don't wanna do all that crap!"
So I started with: #4 and just ran cordova clean in the same terminal then re-ran ionic cordova run android --device and was scanning QR codes moments later.
So you might try that first if you see this error. ;)
I think the garbage collection & such don't always complete when you hit save with incomplete / faulty code.  I often have found that I have to stop & restart ionic serve to get it to 'let go' of a previous error.

When I saw @mgreg89 's comment, I thought: "I don't wanna do all that crap!" so I started with #4 cordova clean and it worked.  I didn't even see @hiepxanh 's comment until now.
Ps there is no Facebook plugin in my app. I found several posts about this error & they all were regarding Fb plugin and they also all had the BarcodeScanner plugin which is what I added before it stopped working.

@mgreg89 Those 4 steps did it for me. Thank you!

Thank you, now also cordova.plugins.diagnostic works fine!

Agregar a build.gradle
buildscript {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
}
Y listo!

I got same error message:
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

And I have managed to fix it so I am writing this fix because I have not find it on the internet...
To me looks like that that facebook plugin was not the only one making problem... but one of my plugins also added reference to appcompat library.... Aparently barcodescanner plugin uses this barcodescanner-lib-aar whcih depends on appcompat:26.0.2, so I edited projects.properties file like this:
target=android-26
android.library.reference.1=CordovaLib
android.library.reference.2=app

cordova.system.library.1=com.android.support:appcompat-v7:26+
cordova.system.library.2=com.android.support:support-v4:27.+
cordova.system.library.3=com.google.android.gms:play-services-auth:11.8.0
cordova.system.library.4=com.google.android.gms:play-services-identity:11.8.0
cordova.system.library.5=com.facebook.android:facebook-android-sdk:4.14.+

cordova.gradle.include.1=cordova-plugin-telerik-imagepicker/starter-ignorelinterrors.gradle
cordova.gradle.include.2=cordova-plugin-telerik-imagepicker/starter-androidtarget.gradle
cordova.gradle.include.3=phonegap-plugin-barcodescanner/starter-barcodescanner.gradle

I put this project.properties in resources/android folder and added this entry to config.xml
<resource-file src="resources/android/project.properties" target="project.properties" />

Be careful with this when adding next plugin, because this line will always override that project.properties inside platforms/android folder, so updated it every time you install new plugin
These are my plugins:
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-geolocation" spec="^4.0.1">
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="..." />
    </plugin>
    <plugin name="cordova-plugin-telerik-imagepicker" spec="^2.2.1">
        <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="..." />
    </plugin>
    <plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.4.0" />
    <plugin name="cordova-sqlite-storage" spec="^2.3.2" />
    <plugin name="phonegap-plugin-barcodescanner" spec="^8.0.0">
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-facebook4" spec="^1.7.4">
        <variable name="APP_ID" value="..." />
        <variable name="APP_NAME" value="..." />
    </plugin>
    <plugin name="cordova-plugin-googleplus" spec="^5.3.0">
        <variable name="REVERSED_CLIENT_ID" value="..." />
    </plugin>
    <engine name="android" spec="7.0.0" />

run cordova clean and cordova build android and everything works fine

I have been dealing with the conflict between barcodescanner plugin and facebook4 plugin for 2 days now reading and applying all suggestions without success, and just now I was able to build it successfully on Android, following these steps:

installed version 1.7.4 of facebook4 plugin
removed android platform
added android platform
installed latest version of barcodescanner plugin (somehow barcodescanner plugin doesn't get installed into android platform if I install it before adding the android platform. ios doesn't have this problem though.)
added fb_app_id and fb_app_name records into strings.xml (somehow these don't get written automatically)
builded the app for android

cordova  clean from @hiepxanh
works for me. not using barcode scanner. but got this error. so tried cordova clean and it can compile fine

@Velm14 Fixed.
Thanks

Its not Working helped....

same problem here...

In my case https://stackoverflow.com/a/49274288/7490381 was a solution.

I can scan barcode but when I try to scan barcode, It's not scan.
Please help.

Closing as duplicate of https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/535


how to build vita2dlib?

When I build it appear the following error:
/usr/local/vitasdk/bin/arm-vita-eabi-gcc -Wl,-q -Wall -O3 -Iinclude -I/usr/local/vitasdk/arm-vita-eabi/include/freetype2   -c -o source/vita2d.o source/vita2d.c /usr/local/vitasdk/bin/arm-vita-eabi-gcc -Wl,-q -Wall -O3 -Iinclude -I/usr/local/vitasdk/arm-vita-eabi/include/freetype2   -c -o source/vita2d_texture.o source/vita2d_texture.c /usr/local/vitasdk/bin/arm-vita-eabi-gcc -Wl,-q -Wall -O3 -Iinclude -I/usr/local/vitasdk/arm-vita-eabi/include/freetype2   -c -o source/vita2d_draw.o source/vita2d_draw.c /usr/local/vitasdk/bin/arm-vita-eabi-gcc -Wl,-q -Wall -O3 -Iinclude -I/usr/local/vitasdk/arm-vita-eabi/include/freetype2   -c -o source/utils.o source/utils.c /usr/local/vitasdk/bin/arm-vita-eabi-gcc -Wl,-q -Wall -O3 -Iinclude -I/usr/local/vitasdk/arm-vita-eabi/include/freetype2   -c -o source/vita2d_image_png.o source/vita2d_image_png.c source/vita2d_image_png.c:5:17: fatal error: png.h: No such file or directory #include <png.h>                  ^ compilation terminated.
as if the lack of a library called libpng， where can I find the library?

I know how to do, thanks


Allowing the component to fire onChange when the inputted value is empty aka ''

Changed some formatting.
Adjusted example to console.log on change.
Adjusted the time input to register a valid input as empty so that when something changes it can be empty.

Bug in code, when component received props - re-submitting.


staticsfiles not registered

django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library. Must be one of:

are you sure this fixes the issue(s)?

fixed in #11


Another crash

Another crash

@bitcoinuser Did you used Github APK or Google Play build?

@bitcoinuser Did you used Github APK or Google Play build?

Google Play

Is there a way to reproduce this?

Is there a way to reproduce this?
If you can reproduce it, can you do it with following build: https://drive.proton.me/urls/VAZWRH29MG#1kvPKw92Maqw

I tested this and for the time I tested, I was unable to reproduce any crash.


How does stun - http work?

I'm having trouble understanding what this app does. If it's able to make internal network ports, like an HTTP server, accessible despite being behind a NAT, that's fantastic! Does it utilize NAT hole punching? And how does it interact with STUN or an HTTP server?
Could you explain how data is transferred using STUN or an HTTP server? My understanding is that modern routers typically don't allow for anything other than solutions like Rathole (https://github.com/rapiz1/rathole), which requires both a server and a client. How is it that this solution doesn't need that?
Thank you

Thank you for your interest in NATMap.
This stun - http method was originally designed by me at Natter, a similar project written in Python, so it might be appropriate for me to explain it.

Let's say we have local IP:PORT A:B. Before we reach STUN server C:D, address A:B will be translated to public address X:Y.
[A:B <--NAT--> X:Y] ---(short)---> C:D (STUN server)

STUN server will tell you your public address X:Y.

However, this is not enough. When we finish the STUN query, the TCP connection closes and the A:B to X:Y translation soon expires.
So we introduce the HTTP connection. This connection also binds to local address A:B, but lasts longer, by sending header Connection: Keep-Alive.
[A:B <--NAT--> X:Y] ---(long)---> E:F (HTTP server)

Up to this point, we have a persistent address mapping A:B to X:Y.
Port A:B can have many outgoing and incoming connections simultaneously by setting flags SO_REUSEADDR and SO_REUSEPORT.
So the third socket also listens to address A:B but accepts incoming connections. People on the Internet visiting port X:Y will finally reach A:B.
[A:B <--NAT--> X:Y] <------ incoming connections


PixelateImage input feature

I tried to implement pixelateImage example but I want it to be removed when lazyLoad loads, is it possible to implment @Input() pixelateImage in the directive to display it and to remove it when lazyLoad image is loaded?

Just to clarify, you want to include a reference to a image that we can remove after another images has been loaded. Eg.

I suppose that would be quite easy to implement but I think that an event emitter would be more generic and more extendable: i.e.

I think that does the job

Just to clarify; this do not exist today but I will accept a pull request for it.

@tjoskar frankly I rolled back to the normal way of loading images after I compared both with and without the directive in a blog loading +15 images at a time, I found a notable decrease of loading speed instead of improving the UX, it seems that the directive would play well with a single big image, otherwise it should be done with a service worker.


Edit button not visible anymore

I loved using the plugin in Joplin so far. Great work, thanks!
I assume that the latest update of Joplin broke something. I can create new diagrams without problems but editing them afterwards is not possible. The "Edit" button is not visible anymore. Unfortunately I cannot provide a pull request as I am not familiar with Typescript.
Starting with this version the edit functionality was not available anymore:
Joplin 2.14.17 (prod, darwin)
Client ID: aebc7a9b3a144e89af8d825bd244be32
Sync Version: 3
Profile Version: 46
Keychain Supported: No
Revision: 094175c
Backup: 1.4.0
Draw.io: 2.2.0
macOS theme: 1.3.18
Note overview: 1.7.1
Templates: 2.4.0
Thanks!

I just want to mention that everything works again:
Joplin 2.14.20 (prod, darwin)
Client ID: aebc7a9b3a144e89af8d825bd244be32
Sync Version: 3
Profile Version: 46
Keychain Supported: No
Revision: cfd98e3
Backup: 1.4.0
Draw.io: 2.2.0
macOS theme: 1.3.18
Note overview: 1.7.1
Templates: 2.4.0
Thanks for the awesome plugin!


Type 'UIView' has no member 'AnimationOptions'

I am using XCode 9.4.1 and Swift 4.1 and getting error on project compilation
Issue
Type 'UIView' has no member 'AnimationOptions'
DKCamera.swift -> Line 793
Solutions tried
I then downgraded the pod version to 1.5.3 but it still shows the same error.

I can trace the commit https://github.com/zhangao0086/DKCamera/commit/7f4409b3f6439812cccc3d086a527cf2fc6477a0 and it seems the code is recently modified for Swift 4.2
Please provide any temporary solution for Swift 4.1

Hi @unleashedspeed
Try this:
pod 'DKCamera', '~> 1.5'

@zhangao0086
Thanks for prompt response.
pod 'DKCamera', '~> 1.5' install pod version 1.6.1 and the same issue persist
I had to fix the pod version like this
pod 'DKCamera', '1.5.3'�
and also I had to do this for DKImagePickerController and DKPhotoGallery.

Closing this thread.


Unable to disable ctrlf-mode with (ctrlf-local-mode -1)

With the latest commit b8a7899
https://github.com/raxod502/ctrlf#disabling-ctrlf-locally This method to temp enable i-search is broken.
Any idea?

Yup, broken in pdf-tools.
https://github.com/raxod502/ctrlf#disabling-ctrlf-locally
doesnt work.

Sorry about that, folks! It turns out to be due to a totally unexpected interaction between a few Emacs systems, which I've worked around in the above-linked commit.


Additional target for Collector collected data?

Question for the Hygieia community.  I have seen some issues posted here asking about the support for alternative datasources from MongoDB.  But, I was thinking of an alternative option from supporting alternative "datasource".
How much interest would there be for an enhancement to Hygieia that would enable collectors to send the data they collect to a configurable endpoint (e.g REST) in addition to going to MongoDB?  I was thinking this destination endpoint would be configured per collector.  The endpoint would be optional, so it is only executed if it is configured.

@ceytalis What will be the role of the endpoint? Is it used by Hygieia in any way or is it some analytical tool ?

@satishc1 I saw the role of the endpoint as a way to share the data collection event preformed by Hygieia with systems external to Hygieia.  It is a notification that a particular data collection event took place and here is the data that was collected.  The system behind the endpoint could then do whatever it wants with the notification and data.


Create new target_permission parameter for projectile to target

I needed to make a spell only target people with specific permissions, and so I made this parameter to do this! I thought this would be pretty useful :smile:

Nice, I like it! GG adding a debug message too.


Channel fails to match the required pattern: /^[a-z\d][a-z\d._-]*$/

Summary
While attempting a build under the "development-release" profile, an error is encountered due to a pattern mismatch with the specified channel name "feature/custom-build-channel". The error message received is: fails to match the required pattern: /^[a-z\d][a-z\d._-]*$/.
Despite the channel "feature/custom-build-channel" being present in the channel list, direct builds with this channel name result in the mentioned error. This channel name is automatically generated during the eas update process based on the branch title. The current pattern validation seems to restrict the use of forward slashes (/), which are part of the automatically generated channel names, thus preventing the build from proceeding
Managed or bare?
bare
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.5
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 9.9.0 - ~/Documents/vitable-mobile/node_modules/.bin/npm
Managers:
CocoaPods: 1.12.0 - /Users/[redacted]/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
npmPackages:
expo: ^48.0.0 => 48.0.20
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-web: ~0.18.9 => 0.18.12
npmGlobalPackages:
eas-cli: 3.9.1
expo-cli: 6.0.2
Expo Workflow: bare
Error output
eas.json is not valid.

"build.development-release.channel" with value "feature/custom-build-channel" fails to match the required pattern: /^[a-z\d][a-z\d._-]*$/

Reproducible demo or steps to reproduce from a blank project
create eas.json
create development-release profile on build property
set channel to "feature/custom-build-channel"
eas build --profile "development-release" --platform ios --non-interactive --no-wait;

I believe this regex validation rule is here to stay, what I think we can do is to improve this automatic channel name generation algorithm so it doesn't generate invalid channel names. What do you think @quinlanj?


CDRs do not seem to be firing properly

I'm very new to drachtio but long time telecom developer.    I'm going through the code bases and it appears to me that something is odd with the CDRs firing.  Most likely a misunderstanding on my part, but here is what i see;
Note:  This is the latest docker image as of time/date of this posting.  I do have true in the drachtio.conf.xml and verfied it by exec into the running docker image.
When working with CDRs should all 3 'on' methods fire for a good call?  I'm doing a createB2BUA with an inbound call to an outbound B leg.    I have the following CDR app code:
const Srf = require('drachtio-srf');
const srf = new Srf();

srf.connect({
  host: '<IP_ADDRESS>',
  port: 9022,
  secret: 'password',
});

srf
  .on('connect', (err, hostport) => {
    console.log(`connected to a drachtio server listening on: ${hostport}`);
  })
  .on('error', err => {
    console.log(`Error connecting to drachtio server: ${err}`);
  });

// register to receive CDRs
srf.on('cdr:attempt', (source, time, msg) => {
  console.log(
    `got attempt record from ${source} at ${time}: ${msg.get('Call-Id')}`,
  );
});

srf.on('cdr:start', (source, time, role, msg) => {
  console.log(
    `got start record from ${source} at ${time} with role ${role}: ${msg.get(
      'Call-Id',
    )}`,
  );
});

srf.on('cdr:stop', (source, time, reason, msg) => {
  console.log(
    `got stop record from ${source} at ${time} with reason ${reason}: ${msg.get(
      'Call-Id',
    )}`,
  );
});

Note:  This connects fine, i changed server for security.
In the main app i have the createB2BUA section that works well with the calls . But the only section that i see in CDR is the attempt method.   No matter how long the call is up .  The attempt fires prior to the call setup.
I also have a "go away" section in the main app that only does:
console.log(`Hanging up on ${req.calledNumber}`);
    res.send(486, 'So sorry, busy right now', {
      headers: {
        'X-Custom-Header': 'because why not?',
      },
    });

This section is only if I don't recognize the source.    Here i have seen CDR code fire the start and stop.
I would think the start and stop should fire for every call.  Most likely for every leg of every call.  But that does not seem to be the case.
So just a little confused.
Thanks
Tim

I'll check into it...my guess is that there is an issue with cdrs in the b2b scenario.  I originally implemented and tested this in the proxy scenario, and found recently I had neglected to implement them for b2b....I then thought I had fixed them, but apparently maybe not.  Will investigate further

Yes, I see now I made some changes for this but never merged them.  Any chance that you can build and test against the 'b2b-cdr' branch so I can verify your tests work before I merge into develop?

Sure.    I’ll pull first thing in the morning.
On May 14, 2019, 9:17 PM -0400, Dave Horton<EMAIL_ADDRESS>wrote:

Yes, I see now I made some changes for this but never merged them. Any chance that you can build and test against the 'b2b-cdr' branch so I can verify your tests work before I merge into develop?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Pulled and built the docker from the server branch.  Now seeing:
got attempt record from network at 12:31:03.010064<EMAIL_ADDRESS>got attempt record from application at 12:31:03.056861: 24e65e2d-f1b0-1237-dba2-0050568d51f2
got start record from network at 12:31:06.646269 with role uac: 24e65e2d-f1b0-1237-dba2-0050568d51f2
got start record from application at 12:31:06.691696 with role uas<EMAIL_ADDRESS>got stop record from network at 12:31:15.799471 with reason normal-release<EMAIL_ADDRESS>got stop record from application at 12:31:15.843260 with reason normal-release: 24e65e2d-f1b0-1237-dba2-0050568d51f2

I will need to test further but appears much better.
Thanks

closing this as I have merged the changes into the develop branch, and the v0.8.2 release.  Please reopen if you come across any further related issues.


Installing Amuse on macOS

Just for reference, I want to paste here my notes on installing Amuse on macOS as a total newbie. Maybe some of it proves useful to someone.
ATTEMPT 1
conda install mpi4py nose
./configure
make build3 -j4

--> 22 out of 47 codes built, 4 out of 6 libraries built
Mainly the fortran codes seem problematic, seems to be an issue with mpif90. Openmpi was installed through conda, maybe try via macports.
NOTES
Seeing a lot of:
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma

Not really pretty, what's going on?
Also quite a few
Can't parse .../SOME_FILE.py: ParseError: bad input: type=22, value='=', context=('', (209, 59))

ATTEMPT 2a
sudo port install openmpi

ATTEMPT 2b
The conda-forge openmpi build does seem fortran-enabled (https://github.com/conda-forge/openmpi-feedstock/search?q=fortran&unscoped_q=fortran), so we can also try that one first.
conda install -c conda-forge openmpi
--> 35 out of 47 codes built, 4 out of 6 libraries built
CONDA ENV
Amuse is Python 2 by default.
conda create -n amuse python=2.7
It should be possible to run with Python 3 by running python setup.py build instead of make.
NOSETESTS
Necessary for running tests in clean conda env:
conda install nose numpy docutils
conda install -c conda-forge mpi4py
conda install ipython h5py
To avoid all the MPI firewall crap, do only core tests:
nosetests test/core_tests
ATTEMPT 3
Now also install gfortran through conda
conda install -c anaconda gfortran_osx-64
Do make clean and rebuild, also configure. Now don't have to do make build3 anymore, that was because I built in a python3 environment before, but not anymore now.
--> 22 out of 46 codes built, 5 out of 6 libraries built
conda install -c conda-forge cython
--> 30 out of 46 codes built, 5 out of 6 libraries built
Try to build bhtree (one of the not-built ones) manually:
cd src/amuse/community/bhtree
make

Shows linking errors to std:: things... that usually means compiler or stdlib mismatch.
Back in the amuse root dir, check config.mk: shows that it detects g++ and gcc (macports) for CXX and CC, but that mpicc and mpicxx use clang, so there's the mismatch. Indeed, bhtree builds some parts with g++ and some with mpicxx.
ATTEMPT 4
If you have gcc installed via Macports, make sure the configuration detects clang as your main compilers to avoid later linking problems (e.g. we saw this with bhtree):
make clean
env CXX=clang++ CC=clang ./configure
make -j4
--> 22 out of 46 codes built, 5 out of 6 libraries built
Check adaptb:
cd src/amuse/community/adaptb
make

--> fatal error: 'mpfr.h'
conda install mpfr -c conda-forge
Still same error...
Seems like configure doesn't find things in $CONDA_PREFIX? Let's add it then. And also add some dependencies while we're at it
conda install -c conda-forge fftw gsl gmp netcdf4
env CXX=clang++ CC=clang ./configure --with-mpfr=$CONDA_PREFIX --with-hdf5=$CONDA_PREFIX --with-fftw=$CONDA_PREFIX --with-gsl-prefix=$CONDA_PREFIX --with-gmp=$CONDA_PREFIX --with-netcdf=$CONDA_PREFIX
make -j4

--> 37 out of 46 codes built, 5 out of 6 libraries built
ATTEMPTS 5 & 6
At runtime, I get @rpath/libSOMETHING not found errors. This is due to building without ld flags for rpath. Tried installing pkg-config to automagically fix this, but didn't work. It does help in the configure process, though not for GMP and HDF5. In any case, try rebuild with added LD_FLAGS. I wanted to also remove some of the above options because pkg-config should detect them, which in most cases it indeed does, and netcdf is apparently not detectable even with the flag, but it turned out they all had to stay in, otherwise stuff doesn't get built... seems like these flags are both "activation flags" and path-specifiers in one... anyway:
conda install -c conda-forge pkg-config
env CXX=clang++ CC=clang LDFLAGS="-Wl,-rpath,$CONDA_PREFIX/lib" ./configure --with-hdf5=$CONDA_PREFIX --with-gmp=$CONDA_PREFIX --with-mpfr=$CONDA_PREFIX --with-fftw=$CONDA_PREFIX --with-gsl-prefix=$CONDA_PREFIX
make -j4

--> 40 out of 46 codes built, 5 out of 6 libraries built
However, arrrgh, hermite0_worker still fails with the same error. Does it not use LD_FLAGS perhaps?
Oh wait, I had typed LD_FLAGS instead of LDFLAGS... d'oh!
Again...
--> 24 out of 46 codes built, 5 out of 6 libraries built
.. but when I manually build athena (cd src/amuse/community/athena; make) it seems to build just fine... maybe a problem with make -j4 then? Try again with just one job:
make

--> 42 out of 46 codes built, 5 out of 6 libraries built
Okay then! Let's give it yet another shot :D
... that doesn't change the outcome. So indeed the multiple make jobs seem to break things... odd.
The remaining failing ones:

fastkick
fi
hacs64
kepler_orbiters

Fastkick:
make clean
make
--> builds!
Fi:
Can't get it to link, because conda fftw is missing fortran symbols, see https://github.com/conda-forge/fftw-feedstock/issues/16. Did a suggestion to fix this using default conda fortran compiler, proposing that I could do a PR for it.
Hacs64:
Weird errors, possibly to do with gcc-specific/non-portable C functions:
... error: using os/log.h requires Xcode 8 or later
...
... error: use of undeclared identifier '__builtin_os_log_format_buffer_size'

Many of the last one. That one seems to have been implemented in LLVM (https://reviews.llvm.org/D25888), but maybe it's not in the Apple version yet.
Kepler_orbiters:
ld: library not found for -lomp

This is an error in the compilation command, the -fopenmp flag doesn't usually work on macOS, and in any case it should first have been detected during configuration before being activated.
So, in the end we end up with
--> 43 out of 46 codes built, 5 out of 6 libraries built
Most importantly, the programs now also seem to run! At least hermite0_worker does.
Let's run the tests then.
nosetests

The firewall messages are still a major annoyance...

Related #240 .


replace glide with dep

fix #47
Signed-off-by: Bo-Yi Wu<EMAIL_ADDRESS>

Codecov Report

Merging #49 into master will increase coverage by 2.98%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage    83.2%   86.18%   +2.98%
==========================================
  Files           1        1
  Lines         125      152      +27
==========================================
+ Hits          104      131      +27
  Misses         20       20
  Partials        1        1

Impacted Files
Coverage Δ

plugin.go
86.18% <0%> (+2.98%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4b32bb...47fc04f. Read the comment docs.


Issue when logging in

What happened?
The first version of my app would be released and then this error occurred. I saw that Moofer also had an update today and previous versions also don't work anymore

What are the steps to reproduce?
This error occurs when logging into your Vanmoof account.
What is the expected behavior?
it to work

Fixed with the latest release 0.0.5


fluxsvc should finish jobs before quitting, so they don't get abandoned

This was in response to an orphaned job. But upon investigation it looks like fluxsvc panicked (fixed).


Add ability to rename asset module for code generation (Loader API, image conversion issues)

Feature request

What is the expected behavior?
Edit: The goal is to implement new API to be able to rename the output file e.g. in an image optimization loader, which can convert the source image to different format and return that as its result (need to change [ext]). Current solutions for this situation are based on the deprecated this._module and overwriting this.resourcePath , this._module.matchResource. See the idea of the new "resourceURL" below, which could be used for code generation, if it was provided by module (i.e. loader sets it).
Be able to define custom placeholders when developing loaders. Consider these custom placeholders [width] and [newext] in an image loader plugin which can convert and resize:
{
  test: /\.(jpe?g|png|webp|avif|tiff)$/i,
  type: 'asset',
  generator: {
    filename: '[name]-[width]-[hash].[newext]'
  },
  use: [
    {
      loader: path.resolve(__dirname, 'MyImageLoader.js'),
      options: {}
    }
  ]
}

What is motivation or use case for adding/changing the behavior?
Think of a custom image loader which can resize and convert images e.g. from CSS urls like some.jpg?format=webp&width=800. Now I can only change the output file extension in my Webpack config like this:
  generator: {
    filename: (pathData) => {
      // get query params for the current file (e.g. ?format=webp)
      const info = pathData.module.resourceResolveData;
      const params = new URLSearchParams(info.query);

      // determine the new output file extension
      const format = params.get('format') || path.extname(info.path).split('.').pop();

      // default filename
      let fileName = '[name].[contenthash:8][ext]';

      // change the extension to the converted format
      format && (fileName = fileName.replace("[ext]", `.${format}`));

      return fileName;
    }
  },

Of course this should be done by the loader itself, but it can't because this._module is deprecated and this would be an ugly hack.
Maybe it's my lack of knowledge but currently I can't find an elegant way to let the converted image file emitted with the new extension and at the same time properly rewrite the url in CSS to the converted output. AFAIK [ext] cannot be overwritten, that's why I started thinking on custom placeholders, because in my case my own [newext] placeholder could solve this problem nicely.
With loaderContext.emitFile  I was able to emit the converted file with proper extension, but I was no able to change the url in CSS with this.callback(null, 'newfilename'). When I avoid emitFile and return the buffer with the converted file in the async callback then the url in CSS is OK, but the extension remains the old one.
How should this be implemented in your opinion?
Maybe some new function to loaderContext / this like setCustomPlaceholder(name, value), but it's just a sudden idea.
Are you willing to work on this yourself?
Unfortunately I'm not at that level...

Sorry out of scope, you can implement own logic using Function

And by default we keep query param, and you can rename this.resourcePath to enforce new extension

And by default we keep query param, and you can rename this.resourcePath to enforce new extension

@alexander-akait Sad to hear that this got rejected but I accept that it's not a priority thing. Also thank you for the hints on the workaround, I've already tried that but without success. What's worse is that after 2 days of hunting some relevant docs on Webpack documentation pages, searching on Google, examining similar packages on NPM, I still haven't find a working solution for this problem, even though I tried lots of variations in my code. Many similar packages are for Webpack 4 and they are using some hacks with file-loader but as I'm using Webpack 5, where file-loader is deprecated, I would like to have a solution only using Asset Modules. Other packages are just doing optimizations on the images and doesn't want to let the output file a different format or name.
In fact, my real problem is that it is not documented anywhere how to alter the output filename ([name] and [ext]) inside a loader. Asking for some more guidance here is my last try on this task (normally I would never ask this here on GitHub).
Source SCSS:
.webp section.hero {
  background-image: url("/assets/images/bg-hero.jpg?format=webp&width=1200");
}

Desired output in Webpack build destination - output - dir based on [name].[contenthash:8][ext]:
bg-hero-1200-81af97af.webp
Final URL in the output CSS file:
background-image: url("/build/bg-hero-1200-81af97af.webp");
My async loader:

based on the query params it can build the desired output name like: bg-hero-1200-81af97af.webp
it does the conversion with Sharp
has the result converted and resized image in a buffer
need to let Asset Module emit the result file with that new name and extension to the output dir
need to change the url in CSS to this new filename

The problem:

just sending back callback(null, buffer); will keep the original filename for the emitted file and in CSS either.
calling this.emitFile can write the output file with new name, but CSS url cannot be changed. Also I think the preferred way should be the callback method. Also if Rule.generator.emit is not disabled, an extra file gets created.
altering this.resourcePath or this.resource not working (also is documented nowhere)
The docs says that async loaders have to send back return undefined so that return module.export = __webpack_public_path__ + JSON.stingify(newURL) thing - which is also not documented anywhere - cannot be used I assume. I've tried it but didn't work either.

The only working solution:
Using a custom Rule.generator.filename in webpack.config.js, like I presented in the first post / 2nd code block. That way the output file can be renamed how I want and the url in CSS will automatically updated by Webpack with the name returned in that function. All is fine, but this logic should be inside my loader.
So... how to alter output [filename] and [ext] inside a loader for the current asset ?

We are working on the same https://github.com/webpack-contrib/image-minimizer-webpack-plugin (right now), anyway it should not introduce new placeholders, because it is impossible (we don't know about module, it can be any type), and very dirty solution.

`altering this.resourcePath or this.resource not working (also is documented nowhere)

It should work (was tested)
You want to change module resource path (extension, but it is only edge case, if we are looking on the problem more deeply, developer can change any place, not only extension), also don't forget about module can be outputed as base64, so no extension here, for this we need something like virtual modules, because original module still can be request in other part in your application and we can't just rename it.

Thank you. I used that plugin before (and many other Imagemin based), but because npm install containing imagemin takes ages to run, I moved to Sharp (ways faster). Build time matters for e.g. static site builds on Netlify and others.

We can create sharp minimizer and generator, it should be not hard, feel free to open an issue, also in roadmap move imagemin in deps, so developer will choose what they want to use

@alexander-akait I'm really sorry, I now that GitHub is not a support forum, but please let me ask one final question related to this thread because I'm totally clueless and wasn't able to find any documentation in the last 5 days. I'm trying to achieve something similar but in a different way.
In my async loader's callback I'm sending the new image as a Buffer and a generated metaData like this:
// result.imageBuffer is the new image as a Buffer
// result.metaData object stores the new width, height, mimetype, ext, etc...
callback(null, resultImageBuffer, null, resultMetaData);

...and in my Webpack config, I have a Rule using my loader like this:
{
  test: /\.(jpe?g|png|webp|avif|tiff)$/i,
  type: 'asset',
  generator: {
    filename: (pathData) => {
      const module = pathData.module;

      let filename = '[name][width][height].[contenthash:8][ext]';

      // now I need to somehow access my resultMetaData
      // to let [width] replaced by metaData.width
      // to let [height] replaced by metaData.height
      // to let [ext] replaced by metaData.ext (the ext of the converted file)
      // ...but it seems impossible...

      return filename;
    }
  },
  use: [
    {
      loader: require.resolve('./MyImageLoader.js'),
      options: { /* some options */ }
    }
  ]
}

I just can't believe that there's no way to access my resultMetaData in Rule.generator.filename (being a function)... If it's not implemented yet, then should I open a new feature request for this? Or am I on a totally wrong way? I'm not an expert bot also not a newbie to JS and Webpack but this one is completely driving me crazy... 😞 There's no page of the Webpack docs that I have not read so far...
I'm already opened a Stackoverflow question too, but I don't expect any usable answer soon (if any...)

I think I am wrong, here my solution https://github.com/webpack-contrib/image-minimizer-webpack-plugin/blob/master/src/loader.js#L142, but it is very dirty, we need API to rename module (and change other parts like resourceQuery, resourceHash and etc), let's open this as feature request, but not as adding ability to use [newext], but how ability to rename module (resourcePath/etc of the module)

Thank you. I was aware of this._module but as it's deprecated, I don't want to use it. I'm happy that you agree that some new API is needed, but I not exactly understand the renaming thing you mentioned. I assume that normally resource and resourcePath are referencing to some existing source file - which initially triggered the loader - and renaming/overwriting them would make them not existing (e.g. for upper loaders in the chain). Is that ok? Would not this bring in new problems?
This all is not in issue for image optimization loaders, because extension and mimetype won't change after optimization. But if a loader returns a Buffer with new image type, the [ext] placeholder and the initial mimetype gets invalid for filename and base64 dataUrl generation for Asset Modules. This is the real problem and unfortunately a complex one.
I know that the loader could save the converted file with this.emit with any name, but in this case Rule.generator.emit has to be disabled and the there's still the problem of renaming the resource for correct Asset Module filename generation...

I assume that normally resource and resourcePath are referencing to some existing source file - which initially triggered the loader - and renaming/overwriting them would make them not existing (e.g. for upper loaders in the chain). Is that ok? Would not this bring in new problems?

We have resolved path to real file and currently resourcePath used only for code generation, so if you change something in resourcePath, it will change only generated code, anyway there is bottleneck - logic in non official loaders can be different and can be broken. So we need something new in webpack to avoid it, maybe this.virtualResource and webpack will use it for code generation instead of resource/resourcePath and other (just idea).

This all is not in issue for image optimization loaders, because extension and mimetype won't change after optimization. But if a loader returns a Buffer with new image type, the [ext] placeholder and the initial mimetype gets invalid for filename and base64 dataUrl generation for Asset Modules. This is the real problem and unfortunately a complex one.

You need change mimetype in your loader too, I want to say it is expected, if you change something, you need change not only buffer, webpack doesn't know about mimetype nothing, now you can do it only using https://github.com/webpack-contrib/image-minimizer-webpack-plugin/blob/master/src/loader.js#L155, but it is dirty workaround (try it)

I know that the loader could save the converted file with this.emit with any name, but in this case Rule.generator.emit has to be disabled and the there's still the problem of renaming the resource for correct Asset Module filename generation... (e.g. to let the background: url() in CSS to be actualized to the manually emitted file)

It is wrong usage, this.emit adds asset to module, but there is module as asset, I want to say it is wrong direction, for example JS/CSS/HTML can contains assets, so module has assets, but image.png can't contains assets, because it is already asset... You should avoid using this.emit, because it will not work for code generation (as you write it here), this problem related to initial problem - ability to change module resource.
Anyway I see we have very complex and unpredictable logic, maybe we should move ahread and do some things better:

Introduce the new property - resourceURL, store only URLs there (i.e. regular paths are converting to file:///, Node.js allows to use it in most of std API, data/file:/http:/etc stored as is), i.e. we will store new URL(...) result there, to avoid performance problem we can use getter, JS ecosystem is moving to using URLs, so I think we should do the same
Allow to change any part of resourceURL and it will be easy, because we have result of the new URL(...) parsing
webpack uses resourceURL for code generation, if it was provided by module (i.e. loader sets it)

So we solved two problems - standardized and simplify logic using resourceURL and allow to rename module (also no virtualResource).
Also not fake virtual modules and hacks for them, if you want to have virtual modules, you need to pass/rename module to data: URI and it will be like virtual module (we have requests on this feature).

Thank you very much for your time and efforts on this!! I like the idea of resourceURL, actually, I'm already using this in my loader with the file: protocol (default), as you mentioned. "Allow to change any part of resourceURL" seems to be an effective and elegant solution.
Previously you mentioned that a new feature request should be opened for this. Do you still want me to open one or are you willing to do that? Maybe you could describe this problem - and your idea - more properly. As you said, image-minimizer-webpack-plugin suffers from this deficiency either... (dirty code, deprecated API usage). As you wish - I understand if you are busy.
As for my original problem, looking at your code - thanks! - I decided to refactor my loader (remove my custom workarounds) and start using this._module (overwriting resourcePath and matchResource) as you confirmed that currently there's no existing API for this renaming issue. Now there's hope, so until then it will be fine. Hopefully, the deprecated this._module won't be removed sooner.

Do you still want me to open one or are you willing to do that?

Let's keep open this issues, because we have context of the problem here and ideas how we can fix it, this will allow you not to lose something. Yes, I hope we will improve API in near future, because we need this for official solutions too.

Hopefully, the deprecated this._module won't be removed sooner.

this._module will be never removed due compatibility problems between versions, so you can use it when you don't have other solutions (anyway I prefer say to do not use if you have good API)

Let's keep open this issues, because we have context of the problem here and ideas how we can fix it, this will allow you not to lose something.

Okay. What about the original title? Shouldn't at least that be renamed to something more relevant? (Any tip for a good one? - if you think so)

Yes, I hope we will improve API in the near future because we need this for official solutions too.

This is good news. Thank you very much!

Okay. What about the original title? Shouldn't at least that be renamed to something more relevant? (Any tip for a good one? - if you think so)

Yep, this can be changed :+1:

@alexander-akait what should we do here?

@vankop There are two ideas:

Refactor code using file:/// (so inside webpack we will work only with URL and allow to change it, like other platform starts to do - Node.js/Deno), but it is tricky and require a lot of refactor (maybe we should to do it/think about it in v6?), current;y we have resource/resourcePath/resourceQuery/resourceFragment and more inside code, also we start to supports http/https/file/data protocols, it complicates DX experience and do code more complex
Implement new property in loader context and allow, set it by default on resourcePath, and allow to change it in loader context, if it was changed we will use it as filename for asset loader (and not only), the main problem - we have image-minimizer-webpack-plugin and we need rename image.png to image.webp/image.avif, currently I use https://github.com/webpack-contrib/image-minimizer-webpack-plugin/blob/master/src/loader.js#L133 this workaround

bump


Audio will not play on linked page

To reproduce the bug:

Create a new page (e.g. "Audio.md") and insert an .mp4 file.
Create a second page, and create a link:
[[Audio]]
Switch to Reading Mode
Hover over the link. A popup will appear showing the audio play button.
Click the Audio play button.

What happens:
Nothing plays.
What should happen:
Audio should play.
Control test:

Turn off media-extended plugin
Repeat above steps
The audio will play normally.

same here

Apologies for the long period of inactivity on this project. I wanted to inform you that the plugin has been fully rewritten for the v3 release. I'm currently preparing for the beta release. Once it's available, if you encounter similar issues, please don't hesitate to open a new issue. Thank you for your understanding.


Add contributors to README.md

hey can i do it for you?

Here is the list of contributors
https://github.com/arpittyagirocks/Humari-Dukan/graphs/contributors


Knex is not a constructor

Environment
Knex version: 0.95.4
OS: MacOS 15
TypeScript TAG -> @lorefnon.
Bug

Explain what kind of behaviour you are getting and how you think it should do

I am extending a class with Knex and it gives me an error

Error message

TS2507: Type 'typeof knex' is not a constructor function type.

Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.

import {inject, lifeCycleObserver, LifeCycleObserver} from '@loopback/core';
import Knex from 'knex';

const config = {
  client: 'pg',
};

// Observe application's life cycle to disconnect the datasource when
// application is stopped. This allows the application to be shut down
// gracefully. The `stop()` method is inherited from `juggler.DataSource`.
// Learn more at https://loopback.io/doc/en/lb4/Life-cycle.html
@lifeCycleObserver('datasource')
export class MainDataSource extends Knex implements LifeCycleObserver {
  constructor(
    @inject('datasources.config.main', {optional: true})
    dsConfig: object = config,
  ) {
    super(dsConfig);
  }
}

See https://github.com/knex/knex/blob/master/UPGRADING.md
You should be using import {knex, Knex}

See https://github.com/knex/knex/blob/master/UPGRADING.md
You should be using import {knex, Knex}

It doesn't work either.
With knex -> TS2507: Type 'typeof knex' is not a constructor function type.
With Knex -> TS2507: Type 'typeof Knex' is not a constructor function type.

See https://github.com/knex/knex/blob/master/UPGRADING.md
You should be using import {knex, Knex}

The example is like this but it doesn't work either
const Client = require('knex')

class CustomClient extends Client {
  // node 12+
  driverName = 'abcd';
  constructor(config) {
    super(config);
    this.driverName = 'abcd'; // bad way, will not work
    // construction logic
  }
  methodOverride() {
    // logic
  }
}

Do you use TypeScript 4.1+?

Also it is important to note that knex is, indeed, not a class and never was. If it worked previously, it's by mere coincidence and shouldn't be relied upon.

You can see working example of latest knex here: https://github.com/knex/knex-utils/blob/master/test/integration/helpers/knexInstanceProvider.ts

Ok, Thanks. I'm going to close this issue

we still need to update examples


Removed RC from Visual Studio 2017 product name

Removed RC from Visual Studio 2017 product name
Summary
This PR modifies the 10 documents that included the string "Visual Studio 2017 RC".
Fixes #1420
Details
I've also made assorted other changes in text that was closely coupled either to Visual Studio 2015 or Visual Studio 2017 RC.
Suggested Reviewers
@mairaw

LGTM. Should we also update the TOC file?

@mairaw I was thinking we should update the TOC later, so we can minimize merge conflicts. I've have a list of TOC changes from this and the next PR.

ok, sounds good! so this is ready to merge IMO.


[OTHER] adding a .env.example file

What would you like to share?
We can add a .env.example file to let others know what the .env file should look like and what variables it contains.
🥦 Browser
Google Chrome
Checklist ✅

[X] I checked and didn't find similar issue
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (blank for no)

Great idea, I think the reference can be taken from here :
<!-- WE USE RAZORPAY DETAILS (TEST ACCOUNT) -->
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=

<!--


Fix duplicate procedure name issue.

Currently if we try to compile two programs in one context, which contain procedures with the same names, this will lead to a DuplicateProcName error. However we need to be able to do so while compiling transaction with multiple notes.
To achieve this, error was replaced with a warning log message.
This change should not lead to any issues with procedures parsing, compilation and execution.
Related issue: https://github.com/0xPolygonMiden/miden-base/issues/443

@Overcastan are you still working on this?

This may have been fixed by #1277. cc @bitwalker.

I know that #1277 will raise an error if you try to define duplicate procedures in the same module, or try to compile a module graph with duplicate modules, so I believe this is solved as of the merge of #1277.

Closing as superseded by #1277.


Last error needs to be cleared for functions where NULL return is not necessarily an error

Example of a NULL that may be returned on success: GetWindowTextLength
It seems that the User32.GetWindowText can cause an erroneous exception by the following:
Steps to reproduce:

Call something that may potentially set an error, such as Console.WriteLine (Example)
Call User32.GetWindowText on a Window with an empty string title.
The GetWindowTextLength returns 0, which can either mean an error or empty string
User32.GetWindowText interprets this as a potential error and checks the last error
User32.GetWindowText sees the error code that was set by calling Console.WriteLine  prior and misinterprets this as an error of GetWindowTextLength, throwing an exception. This is because successful calls don't set the error value.

Solution:
Whenever it is possible that the last error may be misinterpreted, call SetLastError and clear it, so an empty string can be distinguished from an error. Example

Thanks for the report and suggested fix, @AkariAkaori. That's very insightful, and I agree we should fix up all our helper methods to follow this pattern when the ambiguity exists.

@AkariAkaori I couldn't repro the bug you referred to. I added tests to verify the appropriate behavior even if GetLastError != 0 going into a GetWindowTextLength call and in those tests, the last error is always reset to 0 when the resulting length is 0.
What version of Windows and .NET Framework did you have installed when you saw this fail? Or did you not see this fail but theorized the problem may exist?

I was getting exceptions when I iterated over all windows searching for a window whose text matched a regex with PInvoke.User32 v4.0.30319 targetting NET Framework 4.7 on Windows 10 64-bit enterprise
When I made an implementation that reset the error when appropriate, the exceptions stopped.

Reopening per @AkariAkaori's repro.


Add transcription functionality

https://platform.openai.com/docs/guides/speech-to-text
Using the command !transcribe (when replying to a file with audio) whisper model of openai, will transcribe it.

Attention for all of users using this source code -
current codebase is using ffmpeg for converting audio/video files from Whatsapp to mp3.
In background a shell comamand is executed
child_process.execSync(`ffmpeg -hide_banner -loglevel error -i .audio_cache/${filename}.ogg -acodec libmp3lame .audio_cache/${filename}.mp3`);
//-hide_banner -loglevel error flags are only for logging purposes.
So if you want to make this feature work in windows you'll have to download the ffmpeg and change the command accordingly.


Authorisation is required 3 times

Storage Explorer Version: 1.18.1
Build Number: 20210304.5
Platform/OS: Windows 10
Architecture: x64
Regression From:  n/a
Bug Description
When first adding, or restarting the program, I am required to log in with password, then use the authenticator app three times before getting access to the resources.  This loop is automatic, after completing once the pop up appears again.  Closing it early (after one login) doesn't seem to allow access.
Steps to Reproduce

Open app
Account Management --> re-enter credentials
Enter password
Use authenticator app
Go to 3

Expected Experience
I'd expect to login once.  Re-entering credentials each time is a pain but I think part of the organisational settings.
Actual Experience
Login x 3
Additional Context
n/a>

Duplicate of #460. Version 1.19 is going to include some big changes for account management/reauthentication scenarios. Please see the thread on #460 for more info. Thanks!


perf(sourcemap): use simd to escape JSON string

Also optimize the memory allocation in string escape. The default size in serde_json is 1024 for String type, we pre allocate string.len() * 2 + 2 for every string to reduce re-allocate in escaping.
I've tried to hand write SIMD implementation, but it's too complex, so I uses the v_jsonescape here. But it doesn't support aarch64 and wasm32 simd implementation, we need to contribute to it!

#4487  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Brooooooklyn and the rest of your teammates on  Graphite

SIMD! Now we're talking!
But please don't merge before I've reviewed in full. I'm afraid I'm tied up this weekend, so that won't be until Monday.

10% speed up!
Unfortunately, I think the way we're using v_jsonescape here may be dangerous. The crate is not well-documented, but from what I can see, it's determining at build time what CPU features (SSE/AVX) are available, and then it assumes that the CPU where the code runs has those same features.
If you build on same machine as you run the code on, no problem. But if you build a binary on a machine which has AVX2 support, that binary will crash if run on another x86 machine which only has SSE2. This seems like a bad idea - people usually expect they're building portable binaries.
build.rs:
fn main() {
    #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
    {
        if is_x86_feature_detected!("sse2") {
            println!("cargo:rustc-cfg=v_escape_sse");
        }
        if is_x86_feature_detected!("avx2") {
            println!("cargo:rustc-cfg=v_escape_avx");
        }
    }
}

Runtime code:
pub fn b_escape<B: buf_min::Buffer>(s: &[u8], buf: &mut B) {
    #[allow(unused_unsafe)]
    unsafe {
        _b_escape(s, buf)
    }
}

Runtime code:
pub unsafe fn _b_escape<B: buf_min::Buffer>(bytes: &[u8], buf: &mut B) {
    #[cfg(not(v_escape_avx))]
    {
        #[cfg(not(v_escape_sse))]
        {
            scalar::b_escape(bytes, buf)
        }
        #[cfg(v_escape_sse)]
        {
            ranges::sse::b_escape(bytes, buf)
        }
    }
    #[cfg(v_escape_avx)]
    {
        ranges::avx::b_escape(bytes, buf)
    }
}

This problem is mentioned in https://github.com/zzau13/v_escape/issues/54.
It looks like we'd be better off using v_escape::encode which uses runtime CPU feature detection.

Also, perhaps we should merge #4528 first (if it's correct) so we can see effect on benchmarks once the benchmark is measuring what it's meant to.

Unfortunately, I think the way we're using v_jsonescape here may be dangerous. The crate is not well-documented, but from what I can see, it's determining at build time what CPU features (SSE/AVX) are available, and then it assumes that the CPU where the code runs has those same features.

I agree; I can't even run cargo test successfully in the v_escape repo. I think it's worth maintaining our own simd JSON escape implementation and supporting the aarch64/wasm32 backend in it.
So let's just pre-allocate in this pr and implement JSON escape in upcoming separated PRs.

I think we can go forwards with this PR if we switch to using v_jsonescape::encode instead of b_encode. encode uses runtime CPU feature detection, so doesn't have the problem that b_escape does.
I agree that longer term, we'd be better off maintaining our own crate for SIMD ops (lexer and various other parts of Oxc could also benefit a lot from SIMD) and support aarch64 + wasm32 (and also AVX512, which would likely be almost x2 speed boost for some workloads on CPUs that support it).
But for now, this PR is producing a significant speed boost for common case of x86_64, so I think it's worthwhile merging it in meantime if we can remove usage of b_encode.
Personally, I think implementing a SIMD crate will not be a straightforward task. Not so much the code itself, but building the testing infra around it to make sure it's completely solid on all targets (some discussion of this in https://github.com/oxc-project/oxc/discussions/2285). But maybe you're familiar @Brooooooklyn with the cross-platform testing side of things from napi-rs?

Merging! Hooray. @Brooooooklyn I hope you haven't found my approach to review too annoyingly nit-picky. If it is, please say so. I'm new to being maintainer on a popular project. I know Boshen takes a much more light-touch "if the tests pass, merge it" approach, so I'm not sure if I'm out of line.