Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Object 1228 has no method 'replace'

One day, my services were executing fine up until today using this code.
codePendingLink.execute({});//execute pending links service
PendingPhoto.execute({});//execute pending photos service
PendingSignUps.execute({});//execute pending sign ups service
PendingPost.execute({});//execute pending posts service
PendingEvent.execute({});//execute pending events service/code
Now it just returns an error Object 1228 has no method 'replace'

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Object 1228 has no method 'replace'

Hello,

Could you please attach screenshot with error?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Object 1228 has no method 'replace'

Image

Here is a photo. It is a different error yes, but I have made no changes to the app.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Object 1228 has no method 'replace'

Is this happens when a service is invoked?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Object 1228 has no method 'replace'

no, the service never gets invoked. It is returning an error saying that the object (service name) doesn't have any method code.execute({});/code Basically, it isn't compiling the code correctly for some reason.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Object 1228 has no method 'replace'

Can you try removing the service from the page and adding it back?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Object 1228 has no method 'replace'

I tried that, and it did not help, here are some picks of where the exact error is produced (I removed the try catch block)

Image

Image

Also, here is the exact stand alone code that is failing...
code//Admin Services
if(localStorage.getItem('AdminShow') == "true")//if admin is logged in
{
PendingLink.execute({});//execute pending links service
PendingPhoto.execute({});//execute pending photos service
PendingSignUps.execute({});//execute pending sign ups service
PendingPost.execute({});//execute pending posts service
PendingEvent.execute({});//execute pending events service
}/code

Also a screenshot of my services...

Image

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Object 1228 has no method 'replace'

I tried that, it didn't work

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Object 1228 has no method 'replace'

Hello!
1) Do you have custom JS in mapping or some service event (fail, success, complete)? If so please check this JS.
2) Try to find out in what service error happens (leave one service call in code)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Object 1228 has no method 'replace'

By the way, most likely in some of request parameter marked as Header in JS mapping you return a number, but it should be string. Please check.

Return to “Issues”