Blackberry webview can not connect to internet and/or display a web page - eclipse

I am creating a simple app using Eclipse and Blackberry JRE 7.0 as per the example given at:
http://docs.blackberry.com/en/developers/deliverables/11958/Configure_a_browser_field_825671_11.jsp
I am trying to load a simple HTML page hosted on a remote server inside browser field in the app.
When running the app on 9930 Simulator I always get the error 'Local connection timeout after 120000 on simulator'. The same remote page shows up fine on the web browser of the same simulator..
I am making sure to start the MDS simulator.
The same link shows up fine in simulator browser. Its only when using browserfield, I am having the problem.
I get the folling error when clicking the icon to launch the app:
Error displaying content for: http://yahoo.com
Error message: java.lang.runtimeException:ApplicationRegistry:wai​tFor
(0xd0fe7d7338fourd7f0d) timeout
....
On waiting further I get the 'Local connection timeout error..
I know that in Android one has to enable internet connection when using the webview in the manifest file - is there any similar setting one has to do in blackberry?

I tried to run the BrowserField demo app on 9930 (JRE 7.0.0) and encounter the same issues as you did. On the other hand, the demo worked fine on 9800 (JRE 6.0.0). I tried again on 9930 and noticed that though I definitely enabled MDS (enabled the 'Launch Mobile Data System Connection Service (MDS-CS) with simulator' in the Run/Debug Configurations in Eclipse), the MDS window didn't appear which seemed very strange.
I googled a little and found this post on BlackBerry's forums. According to this post:
An incorrect version of MDS-CS simulator was included in 7.0. To correct it you can delete it and copy the version from 6.0.
Well done, RIM!
Then, I deleted the MDS folder from JRE 7.0.0 and copied the one from JRE 6.0.0 as described in the aforementioned post. Closed and rerun simulator and voilà, the MDS window appeared. Rerun application, and everything worked like a charm!

Related

Service-worker.js not available in the for debugging in the chrome dev tools

I understand service-worker runs as a separate thread parallel to the main thread.
I have an android app that runs Webview. My app is in react and i use workbox strategies for caching.
Service worker updates everytime I do a new build. However the source file of service-worker.js is not available in the chrome dev tools for me to debug.
Any idea how i can get the file there so that i can put breakpoints and debug ?
PS: just few days before i could get the file for debugging the dev tools. I am not sure what has changed. I havent changed any settings the the browser.
I'm having the exact same problem with the same symptoms and timeframe. I tried everything I can think of and can no longer get remote debugging of a service worker running in an Android WebView to work.
Like you I am sure it was working in mid-February and stopped working in the last few weeks.
I submitted a bug to Google which you can find here.
I think we can only hope it will be fixed in an upcoming release of Chrome.
You can inspect your extension's service worker but it's tricky, I don't know why Chrome doesn't show the service worker in the default chrome extension devtools.
here is how you can do it:
open chrome://serviceworker-internals/?devtools
find your extension there, there is a textarea that shows console logs, every console log will show the extension path in chrome e.g.
Console: {"lineNumber":688,"message":"[crx-helper] connection error","message_level":3,"sourceIdentifier":3,"sourceURL":"chrome-extension://aobpjedackhiamobjolncblfckdgfjbk/background.bundle.js"}
get that sourceUrl chrome-extension://aobpjedackhiamobjolncblfckdgfjbk/background.bundle.js yours will have a different id, which you can also see in chrome://extensions
paste that path in a new tab and open devtools (screenshot).

Error : DEP6200 : Bootstrapping 'Device' failed. Device cannot be found

I've read every StackOverflow that I could find on this issue, but I still can't work it out.
I'm trying to deploy an app to actual device (NOT emulator). But I receive the following error when i try to build:
Severity Code Description Project File Line
Error Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device '30F105C9-681E-420b-A277-7C086EAD8A4E'.':
SEHException - External component has thrown an exception. App1
and
Severity Code Description Project File Line
Error Error : DEP6200 : Bootstrapping 'Device' failed. Device cannot be found. App1
It's worth mentioning that I went from Windows 7 to Windows 10. It's also worth mentioning that my computer was missing the IpOverUsbSvc.exe (not just the registry post, but the actual service was missing). Couldn't find any way to get this back so, so my colleague sent over the .exe and the DLLs and I placed it in it's location. And the service is now running and no longer gives any errors. My device is recognized by the PC, it's running Windows 10 Mobile (but I've also tried with a device running Windows 8.1).
Specs on PC:
Windows 10 Pro (Build 10240)
Using Visual Studio 2015
UWP Tools
Any suggestions to fix my nightmare? Thanks!
Steps that helped me. I have windows 10 mobile build 10581 (and now 10586) installed on phone
Turn off Developer mode on your phone.
Deploy app (UWP or SL) by VS2015 -> Error.
Turn on Developer mode on your phone.
Deploy app (UWP or SL) by VS2015 -> Working.
If you change another device or re-connect you must close VS2015, re-launch and do again!
Finally managed to find a solution to this illusive bug.
It seems that if I didn't have the Windows Phone 8.1 Tools installed I couldn't build to an ARM device (not even Windows 10 Mobile).
So my step to solve this was:
Go to Control Panel -> Programs and Features -> Microsoft Visual Studio ... 2015 -> Modify. And then select the Windows Phone 8.1 Tools.
Pretty pissed that one can't get a reasonable error message when things like this is missing.
I had this issue after updating my device to win10 ver:10.0.10581.0. I tried many things but finally after installing latest sdk and emulators i got it working. You may try installing from this page sdk and emulator:
https://dev.windows.com/en-us/downloads/windows-10-developer-preview
Somehow the new emulators were not visible in vs, they got visible after few restarts and then on device debugging started to work.
But one problem still remain from me that vs crashes after ending debug session with device.
desktop-->my computer--> right click--> management--> service--> start the service Windows Phone IP over USB Transport (IpOverUsbSvc) although maybe the starttype is set as automatic
Seems like there are many issues causing the same error message.
This one worked for me Windows Phone deploy Issue
Essentially you need to remove/uninstall the device from Windows. Then after unplugging and plugging back in, the device and drivers are reinstalled.
I tried many of the suggested solutions to no avail.
After changing the USB-C cable from a USB 3.1 port to a USB 2.0 port on my computer, the error goes away. YMMV
I see it is quite an old post...but I still get this problem. In my case, this happened after I deployed to a second phone I had for testing. After that, VS 2017 now only wants to deploy to that phone and not to the other phone no more. If I start another project, the other phone is recognized and deployable to (listed as device under debug).
Restarting system fixes this...
Also, if I add another project as reference (like a background task) to my project, I will loose the ability to select the devices and emulators under debug. VS 2017 simply then seems to deploy to the last device selected...(really no clue what this is). I have not been able to get the selection of emulators and devices back yet on this one. I only will have the "Start" and "Download new emulators" options. I think this has to do with the fact that VS maybe doesn't know the type (like arm/86/64) of the reference project because it is not set (not needed as this defies the purpose of referencing a project for dynamic references and not the compiled device specific file...)
Hope it helps someone ....
I uninstalled the existing version of the app in device and re-ran it and it worked for me
I got that error for a really simple reason...just opened a new solution I downloaded from GitHub, pressed F5, and got it!
I had left my build configuration in the default "Debug - ARM" setting, when I changed to "Debug - x64" it worked fine!
(Just adding another reason for completeness, not likely to affect your case!)
In case it's helpful for others... I got: DEP6701 bootstrapping failed ... access denied.
Thanks to comments here, I only dev-locked then dev-unlocked my phone (was originally dev-unlocked). Totally works now (took some time installing missing frameworks at first). All good.
Thanks
One more thing could be tried.
Uninstall the existing app if any and then deploy from Visual Studio.
Try on another usb port. It worked

"Installation or uninstallation is not working temporarily" error when trying to launch Tizen watch application from Tizen SDK

When trying to launch the native watch application from Tizen IDE, I see the strange message "Certain application categories, such as "Watch Application", cannot be launched by "Run As".
Indeed, I try to use Run As from the project local menu to launch my app. But how else I am supposed to launch my application on the emulator?
The emulator device (watch) is up and running, visible on desktop as a separate widget. It is selected. The signing configuration is set up.
On the console output I see the message processing result : FATAL_ERROR [61].
I also tried to launch through the created launch configuration but this results the same error message.
The IDE logs show the following stack trace:
[2015.09.06 12:16:48][ERROR] ConnectionExplorer.java(658) - Fail to get platform log
[2015.09.06 12:18:59][ERROR] RdsDeployer.java(269) - Cannot partially upload or reinstall
org.eclipse.core.runtime.CoreException: [RDS] Cannot install application
at org.tizen.common.rds.RdsDeployer.newCoreException(RdsDeployer.java:699)
at org.tizen.common.rds.RdsDeployer.postInstall(RdsDeployer.java:634)
at org.tizen.common.rds.RdsDeployer.partialZipInstall(RdsDeployer.java:566)
at org.tizen.common.rds.RdsDeployer.deploy(RdsDeployer.java:267)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.deployApplication(TizenLaunchDelegate2.java:783)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launchApplicationForRun(TizenLaunchDelegate2.java:504)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launch(TizenLaunchDelegate2.java:216)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.tizen.common.sdb.command.message.CommandErrorException:
Error code: FATAL_ERROR
Error message:
Command: /usr/bin/pkgcmd -q -r -t tpk -n com.au.heywatch
Management: Installation or uninstallation is not working temporarily.
P.S. I add "eclipse" tag because Tizen SDK is very clearly Eclipse based IDE. Using Tizen IDE 2.3.1.
Watch face applications(Web/native) are never installed as widgets. You cannot see them in app menu.
Reason:
Within your tizen-manifest.xml file in your project, you'll find below line there
<watch-application appid="org.tizen.watchsample" exec="watchsample" ambient-support="true">
which makes your app as watch application and these apps are known as watch faces because they will be used in setting as the main watch in gear.
And on emulator, you cannot change the watch face on the home screen. Hence, you won't be able to test your watch application that way.
Had the same issue. My problem was certificate setup.
i followed there instructions: http://127.0.0.1:50224/help/topic/org.tizen.addon.certificate/html/dev_env/setting_author_certificate.htm
(link is from help and should work in browser when Tizen IDE is up, alternately you can go to Tizen IDE -> Help -> Help Content and search Certificate.
More specific: Distributor certificate i had was wrong (use the pass received by Samsung by email)
After fixing certificate, don't forget to right click your device in Connection Explorer and click Permit to install applications.

Troubleshoot Android 4.3 webview within an app that requires up-to-date Google Play services

I need to troubleshoot an issue happening in a webview running within my app. This issue only occurs on Android versions lower or equal to 4.3. My app requires an up to date version of Google Play services.
In order to troubleshoot my webview, I usually can run my app under the Android Emulator (with the latest version of Android), then connect to the web view via Chrome (using chrome://inspect) - the web view appears in Chrome and I'm able to browse the DOM and debug.
To run the app under 4.3, I've created (under AVD) a new device from an existing device definition,
then picked the target Google APIs (Google Inc.) - API Level 18. I've then installed my app, but when trying to run it, I get the error message "This app won't run unless you update Google Play services.". There's an "Update" button on the previous dialog, but nothing happen when clicking on it.
I then tried to debug my issue using Genymotion. I've created a device under 4.3, followed these instructions to flash my device with the latest Google Play services and installed my app. I can now run the app and reproduce the issue within this simulated environment.
The trick now is to be able to connect to the web view from my local Chrome browser. I've enabled remote debugging as described here. Now my device appears in Chrome, but the web view is not showing up in the inspector. Similarly, if I open a new tab under the native browser, it won't show up in the remote inspector. If I open a new tab under Android Chrome though, I can see it showing up under my remote Chrome inspector.
I can see two way moving forward and successfully accessing to the DOM of my webview:
Fixing the "Update" issue under the Android Emulator running 4.3
Or
Connecting to my web view from my Chrome inspector while running the app under Genymotion
Any idea on how to solve one of these two problems?
I have been using weinre for sometimes. it's a pretty good tool to debug webview for android 4.3 and lower. It provides almost same interface as chrome debugger.
All you need to do are:
Install weinre
sudo npm -g install weinre
Client side:
Insert the following code to your webpage <head> section.
Note: it's better to put it at end of <head> section, otherwise there will be some strange errors and debugger won't show up.
<script src="http://<your server ip here>:8081/target/target-script-min.js"></script>
Server side
weinre --boundHost -all- --httpPort 8081
Debugger
open the debugger tool from weinre from your desktop browser:
http://localhost:8081/client/
Finally,
select any target in Targets part and then start debugging.
Remote debugging web views only works on devices with android 4.4 and above.
have a look at this :
https://developer.chrome.com/devtools/docs/remote-debugging

Can't deploy BAR file to BlackBerry 10 Dev Alpha Simulator

I'm trying to port my Android app to BB10 using the BB Android Runtime SDK. I've packaged the app OK and created a BAR file, but cannot get it installed on the BB 10 Dev Alpha simulator. I've tried both running the app from Eclipse using Run As->BlackBerry Android Launch, and using the BlackBerry Tablet OS Graphical Aid 'Install' option, and in both cases I get this output :
Info: Sending request: Install
Info: Action: Install
Info: File size: 1709216
Info: Installing ...
Info: Processing 1709216 bytes
In Eclipse I also get the error 'Failed to deploy project ...'. In the BB graphical aid I just get the above output in the 'Operation Output' window. From seeing other posts it seems I should be seeing further log entries such as 'Info: Progress 0%...', 'Info: Progress 50%...' etc. which I don't see. Any ideas what the problem might be?
My experience is double check if the application has already existed. If yes, you have to remove/uninstall it first from the simulator (by long-click on the application's icon and click the recycle icon at the top-right).
Solved this by completely uninstalling VMPlayer and the BB10 simulator, cleaning my registry and then reinstalling. Still no idea why it wasn't working.
Have installed the brand new BB 10 Dev Simulator version 10.1 - the one that allows selecting to boot into Z10 or Q10 device, and I can now deploy my app every time on Windows. Can only assume the problem was caused by bugs in the previous simulator version.