We have many customers using our AIR application on Mac and Windows, but one customer has this issue, no File popup dialogs, for opening, browse open, this are open from button click handlers but we are on AIR not on Flash in browser so there should not be restrictions, I am unable to find on google similar issues and I am not sure what could cause this only on this machine and how to fix it(if I could fix it in code or tell customer what to configure)
EDIT, here is some sample code
var browseFile:File = File.documentsDirectory;
browseFile.addEventListener(Event.SELECT, fileSelected);
browseFile.browseForDirectory("Select Local Folder");
EDIT2
This is the exception
Error: Error #2014: Feature is not available at this time.
at flash.filesystem::File$/initDocumentsDir()
at flash.filesystem::File$/get documentsDirectoryPath()
at flash.filesystem::File$/get documentsDirectory()
My problem is that I use a .swc that also uses this code that I don't have the source to work around this. I was not aware that this functionality could not work
Related
I am trying to allow a POS web app to print directly to a StarMicronics (or any receipt printer, for that matter) using the Chrome webusb API.
I am using the example here almost exactly except I have modified the vendorId filter to the Vendor ID of StarMicronics. I have also tried it with a completely empty filter. It works great on the Mac computers I have tested it on, but the problem is on Windows.
When I click the print button, Chrome opens up the connection window, my device is listed and I can select it and click Connect. So navigator.usb.getDevices() is working great. When I refresh the window, after having connected the website to the device, Chrome finds the device again with no problem.
The problem comes when I try to do device.open(). I get this error in the console: DOMException: Access Denied. From this point, I can't do either device.selectConfiguration() or device.claimInterface() because I get the error that the device must first be opened, obviously.
I have enabled all the flags I know of in Chrome:
#enable-experimental-web-platform-features
#enable-webusb
#new-usb-backend
But none of this has helped. I have also tried using other printers, such as an HP deskjet and a Dymo Label Writer all with the same resulting error message that access is denied.
Again, it is working fine on Macs.
Any help on this would be greatly appreciated.
You get the "Access Denied" error on Windows because there is already a driver that has claimed the device. The Windows driver model requires that the "winusb.sys" driver be loaded for any device that will be accessed by a userspace application like Chrome.
See my answer to this earlier question about smartcard readers which encounter the same difficulty on Windows.
You'll need to first download the Star Micronics Windows Driver (available here for the SP700). You want the "USB Vendor Class Driver" (again, available here for the SP700)
Of course, there is no auto-installer (to my knowledge), so you'll have to open up the StarUSBVendorClassDriver_... zipped folder, and navigate to Manuals/usb-vendor-class-driver_im_en.pdf.
In reading this, you'll notice that you actually need to install the driver from the CMD line with the following cmd (note the <version_here>, don't COPY+PASTE):
pnputil -a StarUSBVendorClassDriver_<version_here>\USBVendorClassDriver\SMJUSBCOM.INF
Once you have the correct driver installed, download the Zadig utility from the download page here. The website is ad-ridden, but I had no problems.
Open Zadig, toggle the "Options" menu dropdown, and toggle "List All Devices".
You should then see your device in the drop down below. Select it as shown below.
Then, on the LHS dropdown, you will see a "non WinUSB" driver selected. On the RHS, ensure that WinUSB is selected, and click "Replace Driver".
This should enable WebUSB! Happy printing!
I have written file picker code in my project. When i run the project in my windows phone by clicking on device button in visual studio, the app runs fine(I mean it opens pictures library and i can select a photo and preview it).
But when I disconnect my usb and then open the app in the phone and when i open pictures library on click of a button , the pictures library opens briefly and then the app crashes immediately(My app closes).
Can anyone please help me with this??
As written in the blog post , the AndContinue method run in a different process and to do so, the current running app goes into the background or even gets closed sometimes, that is what you are experiencing in your app as far i can tell but not sure why different things happening during debug & deploy.
There must be a callback inside app.xaml.cs specifically to handle the condition when calling application(which was sent into background) comes in foreground, read this blog post carefully & you'll understand as what you need to change in your code :
using-the-andcontinue-methods-in-windows-phone
http://blogs.msdn.com/b/wsdevsol/archive/2014/05/08/using-the-andcontinue-methods-in-windows-phone-silverlight-8-1-apps.aspx
I just dealt with this issue and one of the reasons why there are differences between debug and deploy is because of the suspending event.
During debug, the application does not actually get suspended until you manually do it through Lifecycle Events. This means that when you pick a file on debug and the app is put to the background to load the file picker, it is not actually suspended, while when the app is deployed, it actually gets suspended.
Look into your app_resuming method and OnSuspending methods in your app.xaml that may be causing errors not occurring during debug.
I am tearing my hair out. I have a complicated Flash player application which I want to run on my local Mac, 10.7.4. I set this up a year or so ago on earlier Mac OS, with earlier Flash players, and sometimes I had to fiddle with global settings, etc, but it always worked. But now flash has decided (sensibly) to handle the security settings surrounding this use of Flash from the local System Preferences. Here's the appropriate screen which should let me tell Flash that I am opening files in the folder:
You can see my desperate attempts to get flash to let me open files in /Users/peter/BTDE2/ etc -- all failing.
Why? How do I get around this? or do I just give up on flash as a horrible bad job...
It appears from the documentation at http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7ff0.html#WS6aa5ec234ff3f285139dc56112e3786b68c-7feb that there should be a fix. According to this, there should be a 'Developer Tools' control on the 'Advanced' panel, which gives access to 'Trusted Location' settings. Well, here is the Advanced panel in Flash System Preferences and it shows no such choices. Looks like someone screwed up somewhere.
In the Flash Player panel are you not able to scroll down to reveal the Developer Tools?
I have a simple Windows Phone 7 application which is working perfectly when started from Visual Studio. However, if I deactivate the app (press Windows button or back button from the application's MainPage) and then click the app's icon to relaunch, the screen will flash and return to the list/home screen. I assumed this was an issue with the emulator but when I got a developer device I have the same issue.
Note that reactivating without a complete tombstone works (pressing Windows button from the app and then back).
I have no idea what causes this or how to proceed with debugging. Hopefully someone else has experienced this and knows a fix.
Turns out there is a bug, i found the solution here http://forums.create.msdn.com/forums/p/67522/416995.aspx
In short, it turns out that the Microsoft.Xna.Framework.Media.MediaLibrary class (which I am using to display pictures on applications main page) is not properly initialized when the user has not opened a media hub prior to you calling it. So picture collection properties are null or empty. The solution is to add a call to MediaPlayer.Queue.ToString(), it will force the initialization of the native media library allowing you to invoke the MediaLibrary later on.
Sounds like an unhandled error on startup is causing the app to crash.
Trap/log/handle/display any unhandled exceptions. Also check what you're doing on startup.
IF you are saving something (to Isolated Storage) after first run and then opening it on subsequent launches then that's where I'd look first.
If it works when launched from Visual Studio then this will probably be due to the way you are rebuilding/redeploying the app before launching it in that case.
We're writing a Windows client application in VB.NET. On the first launch of the application it loads a local HTML file "User Guide" for the user to get acquainted with the new software. There is also a menu option to access the content which also produces the same error. Whenever the page is launched, a dialog box appears stating that "The system could not find the specified file.", and then the browser windows loads the content. This is IE8 specific, as we previously tested with IE6 and 7 as well as Firefox with no problems.
Apparently this behavior is also happening within Outlook 2007 for some of our users whenever they click a link in an email, but only on the first link they click.
Also, one condition for the error to appear is that no IE8 window is currently running, otherwise another tab opens and loads the content just fine. We get this error on XP and Vista.
So far this is all I have found about the issue:
http://www.eggheadcafe.com/conversation.aspx?messageid=34394054&threadid=34361999
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?query=general+failure.+the+url+was+&dg=microsoft.public.outlook.general&cat=en_US_db03bd1f-73aa-41e1-abfd-27a6e3c352e5&lang=en&cr=US&pt=&catlist=&dglist=&ptlist=&exp=&sloc=en-us&mid=cb1e6b6d-71fd-4351-ae98-c10fccf5809c
Anything would be greatly appreciated.
Thanks!
Esactly the same issue; problem was resolved by disabling a specific add-on:
"Sophos Web Content Scanner"
So, looks like anti-virus add-ons are the culprit here - or IE8 itself.
Problem can also be reproduced (when add-on is running) by simply entering a url into the Start box on Vista.
The issue is caused by the McAfee Host Intrusion Prevention service. Stopping the service mitigates the issue. So the answer is to contact the team who runs the HIPs application.