Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE9 with shim: SCRIPT28: Out of stack space #58

Closed
lukecyca opened this issue Nov 27, 2013 · 19 comments
Closed

IE9 with shim: SCRIPT28: Out of stack space #58

lukecyca opened this issue Nov 27, 2013 · 19 comments

Comments

@lukecyca
Copy link

In IE9, I get the following on the demo page.

SCRIPT28: Out of stack space
FileAPI.min.js, line 12, character 128
@danialfarid
Copy link
Owner

Could you provide more info please:

What Operating System? Can you find out your installed Flash version and see if the problem exists in IE8 compatibility mode.

What's the file size/type/name you are trying to upload?

@lukecyca
Copy link
Author

Apologies. I hastily filed this issue without due troubleshooting.

I am testing with IE10 on Windows 7 x64 in IE9 compatibility mode (but I've had user reports of failure in the real IE9).

I didn't have Flash installed, so that's why it failed. After installing it, the demo works correctly. Perhaps FileAPI.min.js could give better feedback when Flash is not available. Other than that, there's really no issue here.

@danialfarid
Copy link
Owner

OK, I will try to add a flash detection code for the next release so it would show an appropriate message if flash is not installed.

danialfarid added a commit that referenced this issue Dec 4, 2013
@danialfarid
Copy link
Owner

You will see a warning if flash is not supported in version 1.1.10

@FredJacquemin
Copy link

SCRIPT28: Out of stack space
FileAPI.js, line 157 character 4
OS: Vista in VMWare Fusion
IE9: 0.9.8112 - update versions: 9.0.23
Flash: 12.0.0.44 installed
very very strange error... i'm close to have it to work on IE9. i'll continue to track down this issue step by step.
Works like a charm on IE10 & all other browsers... damn MS!

EDIT-1 :

ok, by curiosity I reordered the script (putting FileAPI after the shim)

<script src="/lib/angular-file-upload/angular-file-upload-shim.js" type="text/javascript"></script> <script src="/lib/angular-file-upload/FileAPI.js" type="text/javascript"></script>

This took away the "Out of stack space" issue, but brought another error
But now I hit this :
Unable to get value of the property 'insertBefore': object is null or undefined
FileAPI.js, line 1368 character 6

Which I solved by including jQuery before the angular-file-upload-shim.js tag:

<script src="http://code.jquery.com/jquery-1.10.1.js"></script> <script src="/lib/angular-file-upload/angular-file-upload-shim.js" type="text/javascript"></script> <script src="/lib/angular-file-upload/FileAPI.js" type="text/javascript"></script>

but this popped up : Unable to get value of the property 'ownerDocument': object is null or undefined
jquery-1.10.1.js, line 1896 character 2

I guess this is hopeless... I cannot count the hours I spent trying to make this work on IE9...
Unless you've got a instant idea, I'll switch to something else and leave Angular-File-Upload for the Pros which undoubtedly I'm not part of.

Edit-1 :
I added this test in FileAPI.js on line 2541:
Was : if( file.file ){
now : if( file.file && (blob["parentNode"] !== undefined) ){

Now, ... , something sent to the server, but not the way I want. I guess that I'll have to tune the POST request (it seems that the body is { callback: 'fileapi139195079660810', file: '[object Object]' }, in which file is only that string '[object Object]' but not the data I'm expecting to receive (the file).
pfff... a bit desperate but I move on.

@danialfarid
Copy link
Owner

You don't need to include FileAPI.js in your html. It is probably library conflict since angular-file-upload uses specific version of FileAPI.js.
Just put the FileAPI.min.js and FileAPI.flash.swf on the same directory as angular-file-upload.js and the order of loading the scripts would be like this:

...
<script src="angular-file-upload-shim.js">
<script src="angular.js">
<script src="angular-file-upload.js">
....

That's all you need. You don't need jQuery for angular-file-upload.

Also make sure when your page is loaded in IE9 when you right click on the browse button it should show the Flash context menu.

And the demo page is always a proof whether it is an issue in your code or the angular-file-upload plugin.

@FredJacquemin
Copy link

ok, now I'm using the JS fom the Dist folder but still :

  • 1: the file select button is not in flash anymore
  • 2: got this : SCRIPT28: Out of stack space / FileAPI.min.js, line 12 character 128
  • 3: when I click a 2nd time on the Select button, I got this error :
    SCRIPT575: Could not complete the operation due to error c00c023f.
    angular-file-upload-shim.min.js, line 2 character 985 (which points out angular-file-upload-shim.js, line 65 character 7 )

@danialfarid
Copy link
Owner

Does the demo page work? what version of angular-file-upload are you using?
The button has to be flash for IE9 unless it won't work

@FredJacquemin
Copy link

yes it does. I'm using the version available in the dist rep. The button is not flash.
this is pretty frustrating. I give up. no upload for IE9 users.

@danialfarid
Copy link
Owner

The only way I can help you is if you post your code here since the demo page works it's a problem in the code.
You can also compare your code with the demo page code, specially the order in which you load the scripts. Also try non-minified version for now for better debugging

@finde
Copy link

finde commented Mar 3, 2014

@FredJacquemin:: Hmm I got the same error as you, but in my case, I hide the input-file using css and use a label (with for-id) to open the input. It open the dialog, but then gave me this error during upload:

SCRIPT28: Out of stack space
FileAPI.min.js, line 12, character 128

I removed the css and the label, and just use the real input-file, voila, works.

I'm not sure which code that cause this error, but I'm done debugging it ( well.. at least for today ) :)

@danialfarid
Copy link
Owner

when you get this error: SCRIPT28: Out of stack space it is most probably because Flash is not loaded for the input. You shouldn't hide the input and the user have to actually click on the input itself because for IE8-9 it is replaced with flash file upload and the only way to open it's dialog is to click on the flash object.

So don't overlay the input with another element unless the input is on top.

@andreipopovici
Copy link

@FredJacquemin and others with problems finding Flash: it's possible that the Flash object is created, just not on top of the Browse button. In your console, search for HTML element object and see if you find it anywhere on the page.

I'm having this issue now (object not created as child of input), but possibly for different reasons than you.

@mruoss
Copy link

mruoss commented May 6, 2014

@andreipopovici I face the very same problem. The object element is not on top of the browse button. Did you find a solution to that? Should the object be a child element of the input (browse) button?

@mruoss
Copy link

mruoss commented May 6, 2014

Never mind. I figured out I had all input elements twice. Once inside a div that had ng-show="dropSupported", once in a div that had ng-hide="dropSupported". I removed the duplicates and only show/hide nececary elements, now it works fine on IE9.

@remolueoend
Copy link

Closed but still relevant I think:
The stack overflow has nothing to do with flash (IE9 uses anyway the iframe-polyfill): #233 (comment)

@lakshmana4a8
Copy link

SCRIPT5007: Unable to get value of the property 'ownerDocument': object is null or undefined
FileAPI.min.js, line 31 character 349

@danialfarid
Copy link
Owner

@remolueoend IE9 uses Flash polyfill and when you right click on the browse button it should show the Flash content menu. If it doesn't then there is a problem with the css.

@danialfarid
Copy link
Owner

I have updated the code related to css and input file element positioning at version 1.6.0.
You can also add ng-file-select to any element not only input file.
This should resolve some of the problems related to positioning of Flash object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants