Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

TypeError: Cannot read property 'trim' of null

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

TypeError: Cannot read property 'trim' of null

Hello,

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

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

TypeError: Cannot read property 'trim' of null

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

TypeError: Cannot read property 'trim' of null

Hi -

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

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

TypeError: Cannot read property 'trim' of null

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

TypeError: Cannot read property 'trim' of null

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

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

TypeError: Cannot read property 'trim' of null

Sergiy,

Thanks. that's a great tip.

Dongzhi

Return to “Issues”