Why is the webview displaying ‘no permission to load’ error when testing from within the super-app? - webview

I am using the webview component to render a webpage in my mini program. In the simulator, the component works as expected, however, when I test it on my android app, I get the error shown in the image.

Please check to see if you have whitelisted the URL that you are trying to access in your mini program’s configuration section on your workspace. Please also note that the simulator supports displaying a webpage hosted locally, however, when you want to test on device, you need to host your site online.

Related

Not able to debug remotely for simple React-Native project

I created a simple project to use on a physical Iphone. After successfully loading it on the Iphone, I was able to see the screen. However, when I tried Remote JS Debugging. I was given this error:
deltaUrlToBlobUrl.js:29 Cross-Origin Read Blocking (CORB) blocked cross-origin response http://192.168.0.32:8081/index.delta?platform=ios&dev=true&minify=false with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details."
The iphone screen just shows Downloading JavaScript Bundle 100% and stays stuck on the screen without loading anything. If I turn of Remote JS debugging, the app works normally.
How do I fix this so I can read console logs?
Change the browser address from localhost:8081/debugger-ui/ to http://192.168.0.32:8081/debugger-ui/ and start Remote JS debugging.
Hope this will help!

Wordpress website not displaying images on certain safari browsers

I have a weird situation, I am developing a site I can see all of the images well on my mac as well as an android phone but on my iPhone and my friends mac, and iPad it is not displaying the images when using safari. Is there something I need to add to the files for this to display properly all through out?
Thanks all feedback welcomes
It appears these assets are linked using https but there is not a valid SSL on the site. So on the devices where it works you have either authorized the SSL or bypassed it, but the other devices have not.
If you open up the Developer Tools in Chrome and view the console you can see the assets with issues along with the error message... "Failed to load resource: net::ERR_INSECURE_RESPONSE"
Just in case someone else has the same problem. For me the problem was that a plugin "Ewww image optimizer" converted images to webP, these were then cached and served by cloudflare and wouldn't load in safari

How to view javascript errors in ios simulator launced by phonegap?

I can't seem to find an answer to this seemingly simple question. I have an app that i've built using the command line phonegap tools and when i start this app it opens up. i am using something called ios_sim (https://github.com/phonegap/ios-sim) which launches the app in the simulator and does not launch xCode (i don't quite understand why this is a feature, it seems like xCode has some useful tools)
Anyhow, my app is not functioning the same way that it does in the browser and i need to debug it. I have also already installed Charles to inspect the requests and i can verify that the correct data is coming from my API so my assumption is that there is some sort of javascript error in rendering the page (the page is partially rendered btw).
All i want to do is view the javascript errors. the same way that you would in the console if you were looking at a web page.
how do you do that?
You have to use Safari Remote Debugging with Web Inspector. See in the relating cordova docs how to do that!

iOS6 - removed console log for IPad - how to use web inspector on windows?

So iOS6 is out, horrah. Now, it appears as though Apple have removed the 'Developer Console' that used to exist in Safari. Great, I hear a lot of people say - it was limited.
But, it works on the device - now apparently you have to connect the device to a Mac to get web inspector?
Is this the only way of debugging with console? Is there a way of debugging with windows, safari? Please note, I don't mean just changing user-agent, which you can do on Safari Windows - that doesn't register touch events - just click.
If you don't have Mac OSX you can use this script as console replacement:
https://github.com/robotnic/waterbug
It shows error message, it's possible to log all kind of variables, you have to turn your iPhone or iPad 90° to the right to open the console.
A poor mans debugging console:
try {
var test = document.do.something();
}
catch (exc) {
alert(exc);
}
One can debug on the device by using bookmarklets (especially within Mobile Safari).
Debugging on the device can be very important if an error only appears live on the device but nowhere else. There is a variety of bookmarklets for developer, so choose the tool of your choice (e.g. Firebug Lite), add it to your bookmarks and use it right where you need it.
This may not be the Developer Console, but it is a method to debug much more accurate and job-oriented.
I wrote a blogpost on how to use bookmarklets on my weblog (there is also a list of other common testing tools and further bookmarklets):
http://hofmannsven.com/2013/laboratory/ios-bookmarklets/
UPDATE: Chrome released its Mobile DevTools which will make debugging (within Google Chome Mobile, Android Devices only) much easier. This will not fix the missing DevTools issue within Safari, but it might help to locate errors on a device:
https://developer.chrome.com/devtools/docs/remote-debugging
http://www.html5rocks.com/en/tutorials/developertools/mobile/
UPDATE2: Mozilla released a Firefox add-on to enable web development across browsers and devices: http://youtu.be/kEFbQwB81RE?t=1m58s
Have a look for weinre. It allows you to inspect a page running in Safari from another computer using a Chrome-like web inspector
You can use window.onerror to debug errors without a console. Simply add this code to your HTML document in its own <script> tag before any other Javascript code:
<script type="text/javascript">
window.onerror = function(e){
alert(e);
};
</script>
This will do so that whenever there is an error, the error message will be shown in an alert dialog box, which is visible in iOS Safari. It's important that the above code runs before the error you're trying to debug, and if you're debugging a syntax error, it's also important that it's in a separate <script> tag.
Instead of Safari on Windows you could use an app by Telerik called AppBuilder. I've found the instructions on this blog. You'll need to get an account to use the Telerik Platform though.
This will give you dev tools like the ones in Safari. I've used it on Win7 64 bit with regular web apps and Phonegap apps running on an iPad with iOS 7.1.
Like neno suggested, Telerik AppBuilder is a great applications. I am actually running Windows XP in a virtual machine on Linux only for the purpose of debugging my iPhone. Windows XP because in my case Windows 7 does regognize the iPhone, but iTunes and Telerik AppBuilder don't.
Looks like the built in console is gone. I tried plugging into a Windows 7 and opened Safari and could not locate the developer console. Then I read this article which confirmed it.
If you need to be able to test your site in both orientations then waterbug is not a good option, because it uses up the landscape orientation for its console view.
One decent option is to use Adobe Edge Inspect. You open your site on Chrome and open the app on your device and your device will mirror whatever page you have open on your desktop. Then you can use the Chrome dev tools to debug your content.

Connect Blackberry Simulator to BES(Enterprise Server)

I want to replicate a scenario where user's will be able to view the PDF files onto the blackberry browser(in the absence of any PDF viewer). Some of the users on our production site are not able to view pdf inside the browser. They are receiving an error "unknown media type:application/pdf", while in case of some pdf's its working fine.
I was not able to replicate the above mentioned scenario using an MDS alone, as it never rendered the pdf inside the browser.
Anyone has a better solution to test such scenarios or if you could list down the steps to connect a Blackberry Simulator to BES where I could test this?

Resources