iphone simulator8.1 start page goes to a /404

Hi

I created a fresh app with rhomobile using the command line(rhodes app myapp) and changed the start_path in rhoconfig.txt to point to an external url. When I try to run that for iPhone simulator using rake run:iPhone, the app loads and I get something like

404 Not Found

"The file /system/http://..... was not found"

where http://...... is the url I am using.

Tried running that in rhosimulator and it doesn't even work there. Doesn't give me any errors but just gets stuck in Loading mode and remains stuck there.

If i change the start_path to default(/app), it works fine in both rhosimulator and iPhone simulator.

I am using Xcode 6.1.1

Any help appreciated.

Thanks

Vishal

Jon Tara
Why would you set the start

Why would you set the start page to an external URL? I doubt that's expected. It looks for a file in the applications's filesystem.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
I just want to serve my own

I just want to serve my own content inside the rhomobile shell and the docs say that any url can be specified for the start_path. I tried several urls on my windows machine on android emulator and it works, I am just having issues with getting that to work on mac for iPhone

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Just curious Vishal,if you

Just curious Vishal,

if you try to navigate to the same URL from the mobileSafari inside the emulator you can reach the page?

is it an HTTPS URL? if yes what about the security certificates?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Hi PietroThe problem is that

Hi Pietro

The problem is that once I get the 404 page, it won't even let me go to other apps or safari at that point. The only option I have after that is to close the emulator, so I can't really verify what you mentioned above. Also, it is not a secure url(no https), so that shouldn't be a problem.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Here is the snapshot of the

Here is the snapshot of the screen I get

Screen%20Shot%202015-01-29%20at%2012.43.28%20PM.png

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
There are some issues with

There are some issues with this editor, I wanted to paste as text what I have attached as a picture, but it won't let me do it, but nonetheless, there is some more info in the screenshot. Please advice

Screen Shot 2015-01-29 at 1.22.22 PM.png

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Vishal,usually you can

Hi Vishal,

usually you can have a better support to cut&paste code or logs using the advanced editor (link in the upper right corner of the editing area).

Another option is to attach the log files to the post.

Second point, would be interesting to see your rhoconfig.txt file, because from the 404 error you get it seems that your app is trying to load more or less the file "/system'http://.....'".

Probably not what you wanted.

If I've to bet a couple of Euros, I'll probably look into the character you used as string delimiter for the URL you passed to the start path.

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Hi PietroThanks for quick

Hi Pietro

Thanks for quick replied=s. I really appreciate that.

Please find attached rhoconfig.txt file. As you would notice, the only thing I have changed in there is the start_path. I was also able to go to the home(through Hardware->Home) and then opened Safari inside simulator(as you suggested) and was able to go to my site with no problems.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Vishal,as I wrote before,

Hi Vishal,

as I wrote before, I think the problem is character you used a string delimeter for the start_path. Seems like an unicode char instead of the hex: 0x27 ascii code you've for example in the option_path settings.

Try using the attached rhoconfig.txt, it's using the correct delimiter.

Let us know if it works.

Best regards

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Hi PietroThat is exactly what

Hi Pietro

That is exactly what it was. My default preferences for TextEdit on my mac was having the option "smart quotes" checked which caused this. I am so glad I could get hold of you. Thanks a bunch for saving my day.

I really appreciate the quick responses I get on this forum

Regards

Vishal

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Is that a real URL in your

Is that a real URL in your rhoconfig.txt, or did you dummy it up for us? If you are dummying-up a URL for illustrative purposes, BTW, it is conventional to use example.com, which has been set-up for that specific purpose.

If this is a real URL, and that is your domain, then you have set-up a DNS record on the public Internet that directs to a non-routable, private address. (10. prefix).

Is your desktop computer (if running on a simulator) or device (if on a real device) on the same local network as that site?

You really should not set public DNS target to a non-routable address. It makes no sense, though, it will "work" so long as you access it from a computer/device that actually can route to that address on your local network.

Try as below from a console window on your Mac.

☺ ➜  ~ ping p-11.civicplus.com

PING p-11.civicplus.com (10.1.18.102): 56 data bytes

Request timeout for icmp_seq 0

Request timeout for icmp_seq 1

Request timeout for icmp_seq 2

^C

--- p-11.civicplus.com ping statistics ---

4 packets transmitted, 0 packets received, 100.0% packet loss

☹ ➜  ~ traceroute p-11.civicplus.com

traceroute to p-11.civicplus.com (10.1.18.102), 64 hops max, 52 byte packets

1  10.0.1.1 (10.0.1.1)  0.522 ms  0.283 ms  0.210 ms

2  * * *

3  * * *

4  * * *

5  * * *

6  * * *

7  * * *

8  * *^C

Frankly, if you are just using Rhodes as a convenient wrapper for a website, you might be better-served by a more basic tool such as PhoneGap/Cordova. Even that might be overkill, there are simple native wrappers that do nothing more than just plop a WebView on the screen.

If this is meant to be placed in the Apple App Store, Apple will summarily reject any such app, with a comment similar to  "we do not approve apps that are just a wrapper for a website.". If you do provide some native functionality, then you will not get that rejection, but a different one: "you must provide an offline experience".

That is, if the user must be online in order for the app to function, that is a non-starter for Apple App Store. They won't accept apps like that.

If it is an internal app that you are deploying through the Enterprise Program, Apple does not pass any judgement on your app and, in fact, never even sees or reviews it, and then you are free to do this.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Did you use RhoSimulator, or

Did you use RhoSimulator, or the Apple simulator?

This might be a limitation of RhoSimulator. I think it may not be expecting the start URL to be outside of the app's filesystem, and doesn't parse the http prefix.


It's not a common scenario, and so I would not be surprised if that is the case.


Even if you use RhoElements, where pages are often read off of a server, it's not usual for the start page to be outside of the app itself.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Hi JonThe problem is fixed as

Hi Jon

The problem is fixed as per the solution suggested by Pietro in the above post. Thanks for taking time to look into this. I really appreciate that.

Thanks

Vishal

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Yes, I see that your entire

Yes, I see that your entire rhoconfig.txt has incorrect quote characters, so this affects not only your start path. It uses Unicode left-quote and right-quote characters, and should use ASCII single (or double, either one will do) quotes.

I don't know if perhaps your editor is incorrectly configured, or perhaps you cut-and-pasted from some example documentation page right from your browser?

If it is the latter, and it is a RhoMobile documentation page, that should be reported, so that it can be fixed and others do not cut-and-paste code with incorrect characters.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Yeah I think it was just

Yeah I think it was just because TextEdit on my mac had default preference set to  "Use SmartQuotes". Unchecking that and restarting textedit fixed the issue.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
I would strongly suggest

I would strongly suggest using something better than TextEdit! The editor built-in to RhoMobile Suite would be better. Something like Sublime Text would be MUCH better. There are many good programmer's editors for Mac. TextEdit is not one of them.

But turning off smart quotes is prudent, since you are not likely to use TextEdit to edit human-readable documents either. So, turn them off in case you might make occasional casual use of it to edit a source file or other plain-text file.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Vishal Bhatia
Hi JonThanks for the

Hi Jon

Thanks for the suggestions. Yeah I switched immediately to "Brackets" yesterday . That seems to work pretty seamlessly for me.

Thanks

Vishal

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments