Weinre not finding a target device - Windows Phone - visual-studio

I am trying to debug my hybrid cordova app using weinre (following this guide)
192.168.1.202 is the IP of my pc.
I have run my weinre server using this
weinre --boundHost 192.168.1.202
then displayed my client interface using this
http://192.168.1.202:8080/client/#anonymous
added the folling line to my html page
<script src="http://192.168.1.202:8080/target/target-script-min.js#anonymous"></script>
and run my app.
My device (wp8.1) is on the same network as my pc. My firewall has been turned off on private network.
Why my target device is not identified (as displayed below)?
PS: I have an express version of Visual Studio so I dont have any another way to debug my hybrid app.

My firewall must be disabled on public network as well. This answers my post and makes it work.

Related

Cannot view mobile app for tab development

I am trying to create a layout for our teams channel tab app but when running the app locally and inspecting it as a mobile device, teams throws an error that the browser is not supported.
Can anyone point me in the correct direction to develop my app for mobile use or how I can view the mobile app from the VS Code Teams Toolkit debugging tools?
I have tried to run the app in chrome and in MS Edge browsers and use the inspector device emulators in both but get the same error. I have also tried connecting via my local machine's IP /the FE port 53000 and also have had no luck there.
I used directly my mobile device (android) with Teams App installed for debugging teams custom tab (both phone and tablet worked fine). Connect your android device to your laptop/desktop (using USB), and then on the phone:
Enable USB debugging
Enable "Developer Preview" in Teams options
In the desktop chrome, navigate to chrome://inspect/devices and you should see your device there in the list available for inspection/debugging. You could probably also connect using local WIFI (?), but I have not tried that. Also never tried that with Edge, so not sure if it works.
https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/developer-tools#access-devtools-from-an-android-device
It's not possible to debug a Teams tab on iOS using Windows (or Mac). Using Dev Tools, we can debug Teams tab in desktop and Android clients.
Ref Document: https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/developer-tools

PWA development in localhost

Currently, I am trying to make my website support PWA. After implementing it, it works on the browser from the desktop where the button to install it is available on the address bar, but when I tested it on my mobile locally, somehow it won't prompt the "Add to home screen" popup.
Could the reason be that I run it locally, as it only uses the HTTP protocol? Or I missed something in order to set up for that popup specifically? My website is on Laravel 7.
Hope anyone could help enlighten me with this issue.
Thank you.
UPDATE: Solved it. Apparently by running the website locally with exposed public port using ngrok with HTTPS protocol, I am able to simulate how the app will behave on the mobile and the "Add to home screen" popup finally appeared.
PWAs by definition need HTTPS connections to be installed and run properly (as you said). On your development machine you are making use of the exception for "localhost". On your mobile device, you are not accessing the site locally as it is not hosted on the device itself.

Not able to debug phonegap app running on windows 8 mobile

I have a phonegap application that has some layout problems. I can run the app in browser for the most part, and this usually get me over the line. But with a new design I need to debug the application layout on windows phone 8.
I'm currently looking at weinre but its not showing anything on the desktop when browsing the local server, I have added the link to my application I have cleaned up everything I can think of. Still blank. Any good tuts around the ones I have read just copy and paste the original docs or are not on my same error.
There's a public weinre server available here:
https://the-weinre.herokuapp.com/
You may have better luck with that than with your local server. There's a demo available on that page, give that a try and see if it works on your windows 8 mobile device.

Unable to access localhost from x-ms-webview

I have this code in my WinJS default.html:
<x-ms-webview src="http://localhost/"></x-ms-webview>
<x-ms-webview src="http://display/"></x-ms-webview>
<x-ms-webview src="http://192.168.1.2/"></x-ms-webview>
display is defined in the hosts file:
127.0.0.1 display
and 192.168.1.2 -- the one that is successful -- is another computer on the network.
This is in my appx.manifest:
display and localhost successfully load in IE on the desktop and metro.
My OS is Windows 8.1 Enterprise. I have also completely disabled the Windows Firewall and this has had no effect.
What else can I do?
Microsoft blocks connections to the local machine except while running from the Visual Studio debugger.[1]
There is, however, a workaround tool. Quoting from this post on an MSDN blog:
Immersive applications (and IE11 on the Desktop) run inside isolated processes known as “AppContainers.” By default, AppContainers are forbidden from sending network traffic to the local computer (loopback).
[...]
I have built a GUI tool that allows you to very easily reconfigure an AppContainer to enable loopback traffic. This tool requires Windows 8 and runs on the .NET Framework v4. When launched, the utility scans your computer’s AppContainers and displays them in a list view. Each entry has a checkbox to the left of it, indicating whether the AppContainer may send loopback traffic. You can toggle these checkboxes individually, or use the buttons at the top to set all of the checkboxes at once. Click Save Changes to commit the configuration changes you’ve made, or click Refresh to reload the current configuration settings.
The aforementioned standalone tool is available from here.

Localhost and Windows Phone Emulator

I'm runnning the Windows Phone Emulator and want to access the local host of the computer the emulator is running on. "http://localhost" doesn't work as well as using the ip address in the emulator's browser.
So, how can I access the localhost or any other PC available in the local network via the browser of the windows phone emulator?
Thanks
Konrad
Strange - it normally works. Perhaps some network configuration setting on your box is affecting it? Try running with fiddler too.

Resources