I'm trying to upload some video files using BackgroundUploader component.
It works great if I keep the application open until the transfer completes.
It also works great if the app is closed, the transfer is completed under the hood, which is great.
But it doesn't work if the application is restarted (rerun normally) before the transfer is finished. Simply put, there is no sign of error, the UploadOperation status is running but nothing happens anymore regarding this upload request.
I can see using WireShark that the transfer is stopped:
When the application starts there is no code that does anything regarding BackgroundUploader.
I don't know why but it behaves as normal when the app is not run from Visual Studio even if it is only Start Without Debugging.
Is this some kind of know issue or limitation?
What will happen with background transfers if the app is updated via Windows Store in the middile?
Related
We have a Kiosk app which runs on Chrome Kiosk mode and is written in React JS. But for some of our Kiosk machines (All of our machines are Windows machines), it seems to be crashing regularly (Approx. %4 of the devices) without any user input or fixed time between crashes.
I reviewed the code several times but never found any background tasks running, or any reason for the Chrome to crash at all.
Because the crashes are irregular, I cannot connect to a problematic device and wait for it to crash for hours to debug the process. And because the app is automatically started via a VB script when Windows is started, the clients often "solve" the crashes by restarting the Kiosk machine, which is time consuming and leads to tons of complaints.
So my questions are;
Can I somehow force Chrome to restart, or lets say Go to first page in history if it crashes?
Can I catch errors globally without using ErrorBoundries in JavaScript (It is already implemented and is used for other things)
I tried using --remote-debugging-port=9222 to use Developer Tools, but I need to be connected to the machine and go to localhost:9222 port manually to use this and cannot afford to be connected to the device all the time. So is there a way to connect and use Developer Tools on 9222 port remotely?
I tried saving console logs to a file (using Chrome Command Line Arguments) but never saw any "Errors" on the list, so is there any arguments to help me save crash logs to a file to inspect them after the crash?
Thanks for all your help.
I'm building a React Native app. Everything was working fine but now when I try to run on Android it gets to the task :app:transformClassesWithDexForDebug, it hangs for 30-60 seconds and then Windows shuts down.
I tried to setup multidex as mentioned here: https://stackoverflow.com/a/56875424 but the result is the same.
I'm not getting any error message, the computer just shuts down abruptly and I have to turn it on again.
Any advice is much appreciated.
In the end, it was two problems mixed:
I was using the new Windows Terminal which is still in beta so I guess the shutdown problem was something to do with it, because I changed to normal good ol' cmd and the shutdown problem disappeared.
The actual error in the compilation process was actually the setup of multidex. I was not extending the MultiDexApplication class.
Thank you all.
I have an app built using Cordova + AngularJS and I have it working on Android perfectly well but am having some issues with Windows 10.
The app will easily crash when minimizing during a process in the app that takes some time to complete. The only messages I can find about the crash is in the Event Viewer in windows where I receive the following Error:
Package xxxxxxxxxxx terminated because it took too long to suspend
I have debugged this with Visual Studio 2017 and used the suspend trigger on the tool bar to simulate the same scenario but have not had any additional errors and actually could recreate the same crash.
If anyone has any suggestions on tools to help debug or ideas what the problem could be then please let me know.
Note: I know we need to reduce the time events take to complete in the app. One of the long running things that happens is saving to the device filesystem
I have a WPF application that is designed for a touchscreen kiosk. Users will not have access to a keyboard or mouse. The application runs fine when started normally from the program icon in windows. However, when it is set up to run automatically at startup (by replacing the Windows shell using a registry key), the application does not function properly.
The application reads an XML file that lists available videos, then displays buttons to show the videos. When run in "kiosk mode," it does not seem to have access to the files in its media directory (the XML file and presumably the videos as well). I suspect that because the application is running in place of the windows explorer, it is missing resources it needs for file access that are normally loaded by windows explorer.
I have not been able to find any info on this - there is plenty of info on how to get an app to run at startup, but not much on how to make sure it will actually function in that environment. The PC is running Windows 7 Professional.
Is my assumption about the problem correct, or is it likely something else (e.g. permissions - we checked the permissions, but maybe they operate differently when you replace the windows shell?) If it is because needed resources are not loaded, does anyone have pointers on how to make sure my app loads them?
Perhaps you have file access occurring via a file dialog? This might explain a bit further. What is the minimum functionality needed to create Shell Replacement for Windows?
because you have stopped windows default running explorer.exe , your program can not get access to default xml directory therefore you should specify the complete path for example like below:
stream = File.Open(#"C:\x86\Debug\xml.xml", FileMode.OpenOrCreate);
I have registered my Phone 7 app as a Share Picker Extension. It works—my app is in the list of Share options and it gets launched and I can load the chosen image. Okay, great.
But then things go wrong in my code. I would like to be able to debug the issues, but I can't seem to keep the debugger attached.
I cannot debug this in the simulator, since the Pictures app (and thus the Share Picker functionality) is not present in the simulator.
I cannot debug this on the phone because as soon as I pick my app from the Share list, the debugger detaches... right as my app is "launching" again.
Is it possible to attach the debugger to a running WP7 app? Is it possible to keep the debugger attached? Am I doing it wrong? Any suggestions, advice or guesses are welcome because I'm tearing my hair out.
When doing M+V hub integration (sorry, haven't done any pictures hub integration yet) I initially used a crude debug technique (Messagebox.Show, etc. - like Justin mentioned) to verify what was being passed to the NavigationEventArgs of OnNavigatedTo and wrapped the whole method in a try..catch block to learn what was going on. I then refactored the code when I knew what could be expected. (Remember OnNavigatedTo will be called when your app is launched normally too and so e won't be populated in the same way.)
When the app is launched from a/the hub it creates a new instance of the app and there is currently no way to connect to this for debugging while the main page is being navigated to.
Great question. I'm unsure if that's possible. As far as I know, there's no way to attach the debugger to when the WP7 O/S starts an app (which wasn't triggered by the debugger).
Photo Share picker extensibility, music+Video hub extensibility and other O/S extensibility points seem to not play nicely with the VS debugger. Normally I resort to MessageBox.Show to debug any problems with WP7 O/S integration.
1) Connect the Device
2) Turn off Zune
3) Start C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86\WPConnect.exe
To properly debug your application that uses the Media Library, you'll need to use the Windows Phone Connect Tool (WPConnect.exe) as described on MSDN. Jaime has some additional tips on his blog.
Once you are connected, you should be able to debug your application. Fingers crossed anyway. If that doesn't help, I'll dig a bit further.
It's not so much about the WPConnect tool. The nature of your application means that you have to have it closed and the user should pick a photo. Only after that the data is returned to the application.
You should read about the application execution model on Windows Phone 7. Also a good explanation is available here.
Initially, I would say that you should look at tombstoning (a good explanation here) but then again, the image returned will re-start the app and won't allow you to directly attach the debugger.
Yeah, looks like this is impossible...
All the answers above seem to be missing the point: I presume you're able to debug your app in the "standalone" mode (when it's launched normally), but not when it's launched via the Share Picker Extension. Am I write? This is the wall I'm hitting... :-(
I thought the proper way would be to attach to the process once it's launched.
I tried to use Debug > Attach to Process, then select Smart Device as the Transport and Windows Phone Device as the Qualifier... But in return I get the ugly "Unable to connect to 'Windows Phone Device'. Not implemented" message.
Bummer :-(