Page 1 of 1

TypeError: Cannot read property 'trim' of null

Posted: Fri Jun 26, 2015 7:36 am
by Dongzhi Yang7528784

Dear Support,

I am facing this error today everytime when I invoke the create_service of one of my collection. Please see the screenshot. I have tried to delete and re-import the service , but it doesn't work.
Before it was working. And yesterday I have changed the collection to a secured collection. I tried to change the collection back to unsecured , but still this problem persists. Please take a look at the screenshot and let me know if you want to take a look at my app.
Thanks
Image


TypeError: Cannot read property 'trim' of null

Posted: Fri Jun 26, 2015 8:55 am
by Serhii Kulibaba

Hello,

Please open your code from 417th line. It looks like you add mapping from (to) array, which is undefined.


TypeError: Cannot read property 'trim' of null

Posted: Fri Jun 26, 2015 3:33 pm
by Dongzhi Yang7528784

Hi Sergiy,

Good news and bad news. Good news is that I found out that one of the mapping fields caused the issue.
bad news is I can not understand why it's causing the issue. It is a Menu component mapped to a number field.
I have 4 fields like this on my page, but only this one causes the problem.
The field value is automatically set to "null", when invoking the service, strange!!
I want to set up a break point and debug it in google chrome, could you let me know how I can set up the break point in the line, in google chrome?
When I open the developer tool in google chrome, I just can not find the line.
Image


TypeError: Cannot read property 'trim' of null

Posted: Fri Jun 26, 2015 7:45 pm
by Illya Stepanov

Hi -

Please take a look at screen shot here, click on parts shown: http://prntscr.com/7lp9ul


TypeError: Cannot read property 'trim' of null

Posted: Sat Jun 27, 2015 5:14 am
by Dongzhi Yang7528784

Hi Illya,
I see that the file named "VM215451" seems to have all the event handler code belonging to my AddNewTask Page. I was able to debug my code and I found out the root cause.

So what is this VM215451 file? It looks like a name with ramdon number, and I can not file the file under "Source" tab of the developer tool.
Apparently this file is very important.Could you provide more information on it?
Thanks.

Dongzhi


TypeError: Cannot read property 'trim' of null

Posted: Sun Jun 28, 2015 6:52 am
by Serhii Kulibaba

Dongzhi, you can use debugger statement in your own code: https://developer.mozilla.org/en-US/d...


TypeError: Cannot read property 'trim' of null

Posted: Sun Jun 28, 2015 10:30 am
by Dongzhi Yang7528784

Sergiy,

Thanks. that's a great tip.

Dongzhi