Phonegap error: Received unhandled URL about:blank

  • 6
  • Problem
  • Updated 9 years ago
When my javascript assigns about:blank url to a frame as src phonegap displays the error:
PhoneGapDelegate::shouldStartLoadWithRequest: Received Unhandled URL about:blank
I am assuming phonegap does not know how to handle about:blank...thats really weird. When I try pointing to a real url e.g. index.html it all works fine.
Any idea what I am supposed to do so phonegap handles about:blank correctly.
Photo of dhiru.003

dhiru.003

  • 4 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 6
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
about:blank is not a standard - it isn't supported on iPhone. This is not a PhoneGap issue.

To work around this, add an empty html file (blank.html) and assign that as the source.
Photo of evodynamic

evodynamic

  • 1 Post
  • 0 Reply Likes
Andrew:

I've created a blank file called blank.html in my www folder but I don't know how to ". . . assign that as the source." Can you help me out?

Thanks,

EvoD
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes

<iframe src="blank.html">
Photo of dhiru.003

dhiru.003

  • 4 Posts
  • 0 Reply Likes
thanks! Thats what I ended up doing. :)
Photo of joelgerber

joelgerber

  • 2 Posts
  • 0 Reply Likes
I'm having the same issue. I followed the tutorial and manually moved the www directory into my XCode project. Even with a simple index.html page I receive the PhoneGapDelegate::shouldStartLoadWithRequest: Received Unhandled URL about:blank in the simulator but then the index.html page loads. When moving this to a device to test, the app crashes on startup. I'm not sure what you mean by placing a blank in the directory. Are you saying to place the <iframe reference above in the index.html file?
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
The iframe is just if you want to load to a blank page - if you don't want to load a blank page in your app, none of this thread should apply to you.
Photo of joelgerber

joelgerber

  • 2 Posts
  • 0 Reply Likes
Thanks. It looks like the real issue is that when you drag the www folder into the project PhoneGap breaks. It still runs in the simulator but it fails with the above error on an actual device.
Photo of ian.newman.uk

ian.newman.uk

  • 2 Posts
  • 0 Reply Likes
Im getting this error in the console window too for all new PhoneGap projects. Is there a solution?
Photo of ian.newman.uk

ian.newman.uk

  • 2 Posts
  • 0 Reply Likes
I get this on all new PhoneGap projects, does any know how to resolve this? I am going to use the index page but still get the error. Where do i set the source?
Photo of joswilgra

joswilgra

  • 1 Post
  • 0 Reply Likes
i had his error copied my index.html and called it blank.html now it's working. Don't know why yet.