Facebook and google maps plugins don't work together in PhoneGap app - phonegap-plugins

I am going to create the app that shows google map and required social login with facebook.
I decided to use:
https://github.com/Wizcorp/phonegap-facebook-plugin
and
https://github.com/wf9a5m75/phonegap-googlemaps-plugin
I don't know what is a reason, but these plugins perfectly work alone, but when I installed them together I got next error:
BUILD FAILED
C:\Users\{USER_NAME}\AppData\Local\Android\sdk\tools\ant\build.xml:577: Jar mismatch! Fix your dependencies
Total time: 1 second
{APP_PATH}\platforms\android\cordova\node_modules\q\q.js: 126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f {APP_PATH}\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: {APP_PATH}\platforms\android\cordova\run.bat: Command failed with exit code 8
You may not have the required environment or OS to run this project
I am not experienced in PhoneGap development, but I guess that both plugins are doing some changes in platform dependencies (and rewriting changes of another plugin).
Could anybody help me with this?

I got the answer of google-maps plugin creator:
The facebook plugin contains android-support-v4.jar, and the map
plugin installs another android-support-v4.jar.
Remove one of them.
I took off android-support-v4.jar from com.phonegap.plugins.facebookconnect folder and left it in libs folder. It was solved my issue (fb and g-maps work together).
So I can mark this question as closed now.
I leave this answer for anybody who meets this issue like me.

Related

React Native Awesome Project Build Fail

Been trying to run the start up AwesomeProject file in VS Code but every time I run npx react-native run-ios...the build fail below comes up. Have looked through the stacks, comments, and questions here but I cannot find anything that is applicable.
Tried to change my terminal and Xcode to load with Rosetta but I get an error there too...
softwareupdate --install-rosetta
Installing Rosetta 2 on this system is not supported.
Not sure where to go from here...
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/********/Library/Developer/Xcode/DerivedData/AwesomeProject-ekivgffrflagyugqmoefmykxoyqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-337605CB7CDF90939BEBF863ED22C375.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
info Run CLI with --verbose flag for more details.
I had this error too, i searched for hours...
What helped me was to downgrade version of react native to "react-native": "0.62.3" from 0.64
It also works with 0.63.
Others found this helpful: https://github.com/facebook/react-native/issues/32157

command phasescriptexecution failed with a nonzero exit code react native IOS

i am facing PhaseScriptExecution error
when i try to build IOS then project not build this give the following error
the following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/ali/Library/Developer/Xcode/DerivedData/NassauTennisMobileApp-akwowvjtagvlxbalhbsvukoitagy/Build/Intermediates.noindex/NassauTennisMobileApp.build/Debug-iphonesimulator/NassauTennisMobileApp.build/Script-00DD1BFF1BD5951E006B06BC.sh
For me: It seems that react native doesn't like spaces in the directory. I was able to build my ios after removing all of the spaces in my directory.
Potential solution to your problem, didn't fix mine but it might help you: The author suggests there is a mismatch between the node version that you're using and the one that xcode is calling/using. The author provides a way to check the versions installed as well as a way to symlink between the two versions => https://dev.to/glocore/react-native-command-phasescriptexecution-failed-of9

Exception could not locate binding file after updating electron version

I'm working on updating my project from using electron version 1.2.5
to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.
I've encountered a problem when I start my project with this new electron version,
the error in general is about "could not locate the binding files. and it mostly regards the async module.
There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)
I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.
I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th
Here's 2 pictures of the error (sorry about the quality, its the best I could get):
First part of error
Second part of error
The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js
Before line 31 I added a newline (next to the binding line)
and wrote:
modPath = __dirname;
This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

Npm package install failure

Trying to learn nodejs following a few articles. I'm able to download and make sure its working using a video from youtube. But now I'm trying to incorporate that in Visual Studio .net 4.5.2. I've tried to added it via new get package manager and the PM console each come back to same error.
"Install-Package: The specified path, file or both are to long. Less than 260 and directory name less than 248" Self explanatory, found this article
So I tried:
npm-flatten
npm-dedupe
also Enable Win32 long paths
It starts adding package npm 3.5.2 files and folders then bombs out and spits the same error. What else am I missing in order to get this package installed?
Thanks for any help

Error code: 800A1391 Source: Microsoft JScript runtime error Running Grunt - Module is undefined

New Grunt user here who is using a lot of new tools (npm nodejs) today.
I've got Grunt "installed" and have been able to create a grunt.js file using the init task as described here: http://net.tutsplus.com/tutorials/javascript-ajax/meeting-grunt-the-build-tool-for-javascript/ and here: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md. But whenever I run the "grunt" command I get an error:
Windows Script Host
Script: c:\users\[]\Documents\code\grunt\grunt.js
Line: 2
Char: 1
Error: 'module' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
As explained in the FAQ, you need to type grunt.cmd instead on Windows because the OS tries to launch grunt.js
Or you can install grunt-cli globally instead. This package will run any version of Grunt if it's been installed locally to your project.
SOLVED !!
So, this problem occur because windows by default associative < *.js > files
with >>
"Microsoft Windows Based Script Host".
grunt need to open by default with (grunt.cmd).
it easy to slove, by change default app (open with..)
Guide :
Go to any javascript file with "js" extension. (any file)
Right-Click(mouse) > Properties > "Opens with:" Change...(button)
Choose Notepad ( or any javascript IDE ).
PROBLEM SOLVED ! :)
good luck
If you're getting a "Microsoft JScript runtime error" that means that node.js isn't even getting invoked; instead Windows Script Host is trying to run your code. That's probably a problem with filetype associations; IIRC Windows defaults to trying to execute a ".js" file with WSH. You may wind up having to create a shortcut to your script, specifying a command line (probably something like "node %1") and a starting directory in order to make sure that it's executed properly.
It would help if you could tell us exactly how you're trying to invoke your code.
it seems that in the latest versions of the grunt modules, you would have to do the following to have it work under windows:
remove any globally installed grunt
npm uninstall -g grunt
install grunt-cli globally
npm install -g grunt-cli
install grunt locally into your project
npm install grunt
installing grunt (v0.4.x) globally does not seem to create the necessary grunt.cmd anymore. it seems that the recommendation is now to have grunt installed locally to be able to use version-specific Gruntfiles
As Florian F suggested, running grunt.cmd works. This is because of the process Windows is looking for your grunt command.
When typing grunt -h Windows will proceed to look for the following files:
./grunt.cmd
./grunt.* (grunt.js is found in this case which is why you see "module is undefined")
%APPDATA%/npm/grunt.cmd
An alternative to using "grunt.cmd" is to use grunter which simply renames the command to grunter... then you no longer have this problem.
To answer this, first we need to understand that the error is caused because it is being executed by Windows Script Host.
Now, run the code from your cmd promt with the following syntax:
>node <application_name>.js
this will allow the Node.js application to open through V8 JavaScript engine(Google's).
P.S: Please reply back if this has helped in resolving your issue else post the problem you are facing after trying this.
I had a similar issue, the problem is file association, I would recommend:
right click on a .js file and choose open with.
then you choose nodejs/node.exe (somewhere in "program files" folder
then make tick box where it says "always open .js files " (paraphrasing)
That should do the trick.
I went through the same issue when running an old Node project.
The issue was with the name of the js file, it was node.js. So the while running the command node node.js, it was opening up a windows dialogue box.
I just changed the name of the file to app.js and the error flew away.
So, in my case i had tryed all the mentioned above with no result.
But i have fund that im dont type: node in the full sentence as the following snipet
node script.js.And remember never understimate your own miscoding.
Solution:
Go to any javascript file with "js" extension. (any file)
Right-Click(mouse) > Properties > "Opens with:" Change...(button)
Choose Notepad ( or any Javascript IDE like VS Code ).

Resources