Yii: File Upload Widget jquery.fineuploader [FineUploader] Caught exception in 'onComplete' callback - Cannot read property 'split' of null - exception

I have an existing source code. I have function called upload resource. If i click on upload button and try to upload image file it says following error.
jquery.fineuploader-3.4.1.min.js:4 [FineUploader] Caught exception in 'onComplete' callback - Cannot read property 'split' of null
In View file, Widget is added i.e. ext.EFineUploader.EFineUploader
Anyone have any idea what could be wrong?

The message indicates that there is an error in your onComplete callback function. You haven't posted your code, so there is no way to determine exactly where the error is, but it appears as if you are attempting to split a string, but the string in your code is null for some reason. You'll need to look closer at your code to determine where the error is.

Related

feathers-blob error dauria can no read property startsWith

I just started using feathers-blob for uploading files from a angular4 client using dropzone.
I followed the example but made an explicit service for the upload not tu blur up the app.js.
It compiles without error, but on execution i receive the following error, even i do NOT use multipart portion:
Info: error:
system/file-upload - Method: create: Cannot read property 'startsWith'
of undefined error: TypeError: Cannot read property 'startsWith' of
undefined
at Dauria.parseDataURI (/projects/esaas-2/esaas-server-basic/node_modules/feathers-blob/node_modules/dauria/dauria.js:27:17)
at Object.create (/projects/esaas-2/esaas-server-basic/node_modules/feathers-blob/lib/index.js:87:52)
at /projects/esaas-2/esaas-server-basic/node_modules/feathers-hooks/lib/hooks.js:101:31
at /projects/esaas-2/esaas-server-basic/node_modules/feathers-hooks/lib/hooks.js:85:16
I also made sure to use the same versions of feathers-blob and dauria and multer as in the sample and not the newer ones from the npm. Result is the same.
What am i doing wrong? Any help appreciated. Thanks
If you look into dauria's code you'll see where the problem comes from:
Dauria.prototype.parseDataURI = function(dataURI){
if(!( dataURI.startsWith('data:') )) throw new Error(
this.errors.MISSING_PREFIX
);
Which means that somehow the value that you pass to the caller dauria.parseDataURI(yourDataVariable) - the yourDataVariable value does not start with 'data:'.
I made a test on Node and I had the same error while trying to upload an image. I solved it by adding the string "data:image/jpeg;base64" followed by the 64 encoded image.

AS3 error- when trying to hit test object

I am trying to test for the collision of two objects. Both are on the display list. They are movie clips, each containing a hit box. One is called hitboxx, and the other is called hits. However, when I test the following code:
if (character2.hitboxx.hitTestObject(Spike1.hits)||character2.hitboxx.hitTestObject(Spike2.hits)||character2.hitboxx.hitTestObject(Spike3.hits))
{
currLives--;
}
I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at SpikeJungle_fla::MainTimeline/frame1()[SpikeJungle_fla.MainTimeline::frame1:126]
it's difficult to say anything on the code. The code seems correct. May be you forget to add variable name or something. Or try to check one movie clip at a time. means try to remove the other condition in and check with one and see whether it's working. And also in Publish Settings >> Advanced >> permit Debugging check this option and compile again and you will get more about the errors.

AS3, Flash: Accessing error messages text in code

I'm working on some flash app. Now, to test customer side of it I can use Flash Player debugger version that will save logs and show error messages. When it's deployed on the customer side - they will have a regular Flash Player version which means I will have no access to error messages if errors will happen. So I would like to equip it with some tool that would capture all of my trace messages in code and errors text. As for trace messages that's fairly simple, I just override the function in my code so it sends a POST request with trace message to a logger server, but how can I get a hold of the error message? Is there a known approach to this or some trick that somebody can suggest?
You can install the debug version of flash as your browser's default (in Chrome, you must disable the built-in player), so if you wanted to test user experience and debug, this would be the ideal solution.
However, to answer your question: there's no method for universally catching all errors, and redirecting them (that I know of). You'd have to encapsulate problem code ahead of time with try...catch statements, and send the property back on catch. For example:
try {
this["foo"]();
} catch (e:Error) {
trace(e);
}
In the debug version, the traced value would be TypeError: Error #1006: value is not a function. And while the standard version will only output TypeError: Error #1006, (a notably less descriptive error), what we're missing is any reference to where the error occured. To get this, we need to use Error.getStackTrace() to see the call stack and the line where the error occurred. In debug, this outputs the following:
TypeError: Error #1006: value is not a function.
at Shell_fla::MainTimeline/init()[C:\Projects\shell.as:91
In the standard client, we get a dissapointing null. In short, you cannot get any valuable info from the client versions.
The best advice I can give is to write around your problem code with your own custom error reports. For example, catch IO errors and trace the file it failed to load, or if you're expecting an object.foo, first try if (object.hasOwnProperty("foo")) { // do something } else { trace("foo not found in " + object.name) }. Code defensively.
Cheers,
I've discovered this post on StackOverflow:
How to catch all exceptions in Flex?
It answers my question, strange that I haven't ran into it while I was googling prior to asking.

System.TypeInitializationException between two program in F#

I'm working on a project and I become always an Exception "TypeInitializationException".
I tried to give a string to a global string variable but it failed.
That's the code for the viewmodel and it failed on the second line
| {State = _}, ConsumablesClicked vm ->
Testtyp <- vm.TrackPosition.ToString()
That's on the other program
let mutable Testtyp = ""
I become this InnerException "Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read.".
"The type initializer for '.$BarcodeGenerieren' threw an exception.", that's the exception explication.
Has someone a Idea how solve this?
That exception indicates that some code is trying to call Console.ReadKey when the standard input for that process has been redirected (see e.g. Allowing redirection of StandardInput of a C# application when doing "Console.ReadKey"). The solution is not to call Console.ReadKey, but it's not clear from your description where this is actually happening (perhaps in the static constructor for one of your types?).
I found the solution after a lot of try and it was only, that I had a Console.Readkey in my code, that I forgot to delete.
I had before a console apllication and I transformed it to be a class.

TypeError: Error #1009: Cannot access a property or method of a null object reference at pizzaBaking/doRESTART()

I have been working in this error for days, i keep searching and asking for help, (including reading from this site as well). It is basically involved a lot of external actionscript.
Every time i finish the interactive and i want to go back to previous frame, the error goes:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at pizzaBaking/doRESTART()
and this is the doRESTART function
public function doRESTART(e:MouseEvent):void{
MovieClip(parent).gotoAndPlay(131);
MovieClip(parent).MENUS.visible = false;
MovieClip(parent).ABOUT.visible = false;
MovieClip(parent).VOUCHER.visible = false;
MovieClip(parent).UPDATES.visible = false;
Due to quite a few of file, i put it all in mediafire, in flash cs6 http://www.mediafire.com/download/10skpaizeyk2kul/pizzaHut.rar
thank you so much
1: Turn on Debugging
Go to your publish settings and enable "Permit Debugging". This will take your ambiguous error...
null object reference at pizzaBaking/doRESTART()
...to a much clearer...
null object reference at pizzaBaking/doRESTART() script\pizzaBaking.as:35
...which now denotes which line in your code to look for your issue.
2: Use the Debug Console
Use the debugging compile mode to bring up the Debug Console. This will provide you with an immediate look at the line of code in question, as well as the Call Stack, and the state of all available Variables. No programmer should be without one.
3: parent == null
When doRESTART() is being called, it no longer has a parent, ergo, when you call MovieClip(parent) it returns a null, and there is no MENUS property on null. This is why it's reporting null object reference.
If I were you, I'd seriously reconsider how you're approaching this. Remove all timeline code, and any use of frame animation. This is likely the reason why your pizzaBaking class lost its parent relationship. Also, there appear to be several instances in which you could consolidate repetitious code into a single function (KeyboardPizza.as being a prime example). Consider passing a method an argument to modify its behavior, or use switch case, or perhaps a lookup table.
That said, press on. It looks like you're making great progress on your project.
-Cheers