Comments (17)
I have no idea why you are having this error. Any other error logs?
from cordova-plugin-geofence.
Any of this help?
GeofencePlugin - GeoNotifications table was created successfully
GeofencePlugin - GeoNotificationManager init
GeofencePlugin - Location services enabled
ERROR: Method 'deviceready:' not defined in Plugin 'GeofencePlugin'
-[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"INVALID",
"GeofencePlugin",
"deviceready",
[
]
]
THREAD WARNING: ['PushPlugin'] took '25.395996' ms. Plugin should use a background thread.
enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.
active
didChangeAuthorizationStatus
didChangeAuthorizationStatus: 3 => AuthorizationStatusAuthorized
Converted locationManager:didChangeAuthorizationStatus: into didChangeAuthorizationStatus
[DOM] _onDelegateCallback() {"eventType":"didChangeAuthorizationStatus","status":"AuthorizationStatusAuthorized"}
[DOM] _mapDelegateCallback() found eventType didChangeAuthorizationStatus
[DOM] DEFAULT didChangeAuthorizationStatus()
active
THREAD WARNING: ['Geolocation'] took '27.729004' ms. Plugin should use a background thread.
THREAD WARNING: ['FileTransfer'] took '21.376953' ms. Plugin should use a background thread.
GeofencePlugin - GeoNotificationManager addOrUpdate
from cordova-plugin-geofence.
Nope :/. Are you trying this on device or simulator? Test if example application works for you.
from cordova-plugin-geofence.
Testing on an iPad mini. I'll try the test app and see if I have the same issue. Thanks.
from cordova-plugin-geofence.
So I cloned the example app, and when I add the ios platform, it fails with this error:
Installing "com.google.playservices" for ios
Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/ionic-geofence/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/ionic-geofence/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
Perhaps my cordova install is missing something...
from cordova-plugin-geofence.
Have you run npm install
before?
from cordova-plugin-geofence.
Yes, I ran npm install -g cordova ionic
from cordova-plugin-geofence.
Hmm, there are always problems with installing packages globally. I think you should also install npm install -g plugman
from cordova-plugin-geofence.
Actually plugman
is not needed. Sorry. Try to run just npm install
. I need to upgrade manual.
from cordova-plugin-geofence.
Yeah, I tried both, but still get the same error.
Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'
from cordova-plugin-geofence.
I've been trying to fix this problem all day and just figured it out. This problem happens in Cordova 5.0, it seems like the platforms script has been broken out into 1 js file per platform.
These changes in hooks/add_swift_support.js is what fixed my problem:
- in line 18, change the module path to 'cordova-lib/src/plugman/platforms/ios'
- in line 24, change "platforms['ios'].parseProjectFile(iosPlatformPath)" to "platforms.parseProjectFile(iosPlatformPath)"
Should install properly then.
from cordova-plugin-geofence.
I recently updated to OS X Yosemite, and I think it's causing some issues. NPM seems to be completely broken. So, once I get these other issues worked out, I'll get back to you and let you know if these fixes work.
from cordova-plugin-geofence.
@lcoling thanks. I will look at cordova 5.0 and try to make plugin compatible with it. @graphicgeek it is always good practice to install npm packages locally only, then you will use proper packages versions after npm install
.
from cordova-plugin-geofence.
Ok, so I got NPM reinstalled and working. It seems it may be a Cordova 5.0 issue. @lcoling's suggestion worked to get the example app working.
I created a blank cordova app (cordova create hello com.example.hello "HelloWorld"), added the ios platform, and then when I add the geofence plugin I get this:
Fetching plugin "https://github.com/cowbell/cordova-plugin-geofence" via git clone
Installing "com.cowbell.cordova.geofence" for ios
Fetching plugin "https://github.com/vstirbu/PromisesPlugin.git" via git clone
Installing "com.vladstirbu.cordova.promise" for ios
WARNING: android.support.v4 has been renamed to cordova-plugin-android-support-v4. You may not be getting the latest version! We suggest you cordova plugin rm android.support.v4
and cordova plugin add cordova-plugin-android-support-v4
.
Fetching plugin "android.support.v4" via cordova plugins registry
Installing "android.support.v4" for ios
WARNING: com.google.playservices has been renamed to cordova-plugin-googleplayservices. You may not be getting the latest version! We suggest you cordova plugin rm com.google.playservices
and cordova plugin add cordova-plugin-googleplayservices
.
Fetching plugin "com.google.playservices" via cordova plugins registry
Installing "com.google.playservices" for ios
Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Context.requireCordovaModule (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Context.requireCordovaModule (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
from cordova-plugin-geofence.
I've just submitted a pull request which handles the pre-5.0 and 5.0 cordova cases.
from cordova-plugin-geofence.
I finally figured out what was causing this. In the parameters object I was passing to the addOrUpdate method, my latitude and longitude were strings instead of floats. I converted these to floats, and viola.
from cordova-plugin-geofence.
Thanks for update. Looks like debugging swift code is a disaster. Error message doesn't say anything useful.
from cordova-plugin-geofence.
Related Issues (20)
- Not getting IOS Notification , but Works on android HOT 2
- Geofence notification in background is working up to android version 7 only
- Unable to install the plugin HOT 3
- repo dead? HOT 2
- It is not working with ionic 4 Cordova 9 HOT 2
- Notifications are not working on latest android version >= 8 HOT 4
- Geofence notifications are not working in background HOT 2
- Not working on ios HOT 2
- Working geofence repo HOT 3
- This is not working in cordova 8 Please add support for cordova 8 HOT 4
- XCODE 11. Swift version not supported HOT 4
- Notification not showing in Android 9+ device
- cannot find symbolimport android.support.v4.app.NotificationCompat;
- Found the mobile hotspot blocked this plugin notification.
- TypeError: Object(...) is not a function at Geofence.initialize HOT 2
- Plugin not creating Local notifications even when app is open
- xamarin Support
- Not able install and use the geofence plugin, following is the error am getting
- Not compatible with Cordova Android 11 due `android:exported` error HOT 1
- Maintained repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-geofence.