I beliebe this is incorrect, it should read
 
io.newURI(webapp.pckManifest.origin,...)

Although I think it's not needed in any case (see next comment)