Open TheOtherRealm opened 8 years ago
Hi there, looks like you are running into cross origin issues which is a problem with your development environment. You can read more about that here: https://jvaneyck.wordpress.com/2014/01/07/cross-domain-requests-in-javascript/
Alright, that makes sense. I haven't changed the code any other then the steps outlined in the GitHub readme. It obviously is trying to call my local machine (http://localhost:8100/pos in config.js?) and reference rCredits, however this configuration is what I got from the server. It probably should be something else – but what, I guess is my question.
Could you give me some more details in how you are running the app? Are you running it on a device or emulator?
I'm running it on my physical device On May 5, 2016 3:58 PM, "Jill Dimond" notifications@github.com wrote:
Could you give me some more details in how you are running the app? Are you running it on a device or emulator?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/sassafrastech/rcredits-mobile/issues/28#issuecomment-217260910
I'm running an unlocked version of Samsung Galaxy, Google flavor Android 4.3 On May 5, 2016 4:27 PM, "Aaron E-J" azintirea@gmail.com wrote:
I'm running it on my physical device On May 5, 2016 3:58 PM, "Jill Dimond" notifications@github.com wrote:
Could you give me some more details in how you are running the app? Are you running it on a device or emulator?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/sassafrastech/rcredits-mobile/issues/28#issuecomment-217260910
Got it, just making sure you weren't running it on an emulator. Two things: 1) Are you running what's in the develop branch? 2) Could you paste what you have for www/js/config.js?
Yes, I am running in the developer branch I haven't changed anything that is not on GitHub, I don't think, but here it is, I've embolden the version I'm using:
// Most app config should go here. Use the BUILD_TARGET directives below to set config that depends on
// whether the app is in dev mode, staging mode, etc.
rCreditsConfig = {
SQLiteDatabase: {
name: 'rcredits',
version: '1.0',
description: 'rCredits DB',
estimatedSize: 20 * 1024 * 1024 // kb
},
// For Demo Cards
stagingServerUrl: 'https://stage-xxx.rcredits.org/pos',
// @if BUILD_TARGET='development'
serverproxyUrl: 'http://localhost:8100/pos',
serverUrl: 'https://stage-xxx.rcredits.org/pos',
version: '3.0',
build: 300,
transaction_max_amount_offline: 300
// @endif
// @if BUILD_TARGET='staging'
serverproxyUrl: 'http://localhost:8100/pos',
serverUrl: 'https://stage-xxx.rcredits.org/pos',
version: '3.0',
build: 300,
transaction_max_amount_offline: 300
// @endif
// @if BUILD_TARGET='production'
serverproxyUrl: 'http://localhost:8100/pos',
serverUrl: 'https://xxx.rcredits.org/pos',
version: '3.0',
build: 300,
transaction_max_amount_offline: 300
// @endif
};
Perhaps try running the app in your browser first with ionic serve
. That
should be easier to debug. Check your JS console for any errors. I suspect
you might be missing the plugin that handles the content origin policy.
On Thu, May 5, 2016 at 8:04 PM, Aaron E-J notifications@github.com wrote:
Yes, I am running in the developer branch I haven't changed anything that is not on GitHub, I don't think, but here it is, I've embolden the version I'm using:
// Most app config should go here. Use the BUILD_TARGET directives below to set config that depends on // whether the app is in dev mode, staging mode, etc. rCreditsConfig = { SQLiteDatabase: { name: 'rcredits', version: '1.0', description: 'rCredits DB', estimatedSize: 20 * 1024 * 1024 // kb }, // For Demo Cards stagingServerUrl: 'https://stage-xxx.rcredits.org/pos', // @if BUILD_TARGET='development' serverproxyUrl: 'http://localhost:8100/pos', serverUrl: 'https://stage-xxx.rcredits.org/pos', version: '3.0', build: 300, transaction_max_amount_offline: 300 // @endif // @if BUILD_TARGET='staging' serverproxyUrl: 'http://localhost:8100/pos', serverUrl: 'https://stage-xxx.rcredits.org/pos', version: '3.0', build: 300, transaction_max_amount_offline: 300 // @endif // @if BUILD_TARGET='production' serverproxyUrl: 'http://localhost:8100/pos', serverUrl: 'https://xxx.rcredits.org/pos', version: '3.0', build: 300, transaction_max_amount_offline: 300 // @endif };
Aaron E-J http://otherrealm.org Vision without action is a daydream, Action without vision is a nightmare, One needs both to succeed. On 2016-05-05 4:49 PM, Jill Dimond wrote:
Got it, just making sure you weren't running it on an emulator. Two things: 1) Are you running what's in the develop branch? 2) Could you paste what you have for www/js/config.js? — You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/sassafrastech/rcredits-mobile/issues/28#issuecomment-217314501
Tom Smyth
Worker-Owner, Sassafras Tech Collective Specializing in innovative, usable tech for social change sassafras.coop · @sassafrastech
Resident, Touchstone Cohousing touchstonecohousing.org
Specifically: https://github.com/apache/cordova-plugin-whitelist
There I don't even get to the scan screen.
Even using the following, I am still getting it:
<allow-navigation href="https://*"/>
<allow-navigation href="http://*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
Wait, didn't install the pluggin... :-)
Nope, realized it was already installed and still nothing...
Anything in your console?
On Thu, May 5, 2016 at 8:59 PM, Aaron E-J notifications@github.com wrote:
Nope, realized it was already installed and still nothing...
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/sassafrastech/rcredits-mobile/issues/28#issuecomment-217321589
Tom Smyth
Worker-Owner, Sassafras Tech Collective Specializing in innovative, usable tech for social change sassafras.coop · @sassafrastech
Resident, Touchstone Cohousing touchstonecohousing.org
Same thing as before.
Ok, I'm going to create a new project and see if I can recreate the problem.
I think it may be due to the fact that it is referencing the wrong address. I turned off wireless and my phone's ip is now 10.95.155.254 but I'm getting the message:
Server
refused the connection. (http://192.168.2.2:8100)`
This is my laptops IP.
So Android Whitelist plugin should be taking care of this. I have pushed a new config.json file with versions of the plugins. I would recommend doing a fresh install, but I need to update the readme with a couple things.
Ok, updated the readme. I did a fresh install and it worked just fine. Let me know how it goes!
Hello Sassafras – this is Aaron, a new developer with rCredits. I have been trying to build your new mobile app but have been running into error messages. Initially my errors had to do with my not fully understanding Ionic, however after resolving those, I now think it is more the rCredits app, related to referencing the wrong server or not being able to load remote content from rcredits.org. I am getting errors after scanning in a barcode. In Android Studio/Android Manager/logcat, it now gives the message:
And in the console:
Do you have any idea why I am getting these? I am assuming it must have something to do with a configuration somewhere but where, I am not sure.