Updating from 1.6 to 1.8

I’ve put it off for a while now, but the time has come I think (amCharts needs 1.8 to be added to Meteor)

I’ve gone the straight forward route and just done meteor update but now by app won’t build. I’m getting the following error:

Error: static resource undefined conflicts with network route /_oauth/
  at RoutePolicy.declare (packages/routepolicy/routepolicy.js:101:13)
  at oauth_server.js (packages/oauth/oauth_server.js:6:13)
  at fileEvaluate (packages/modules-runtime.js:336:7)
  at Module.require (packages/modules-runtime.js:238:14)
  at require (packages/modules-runtime.js:258:21)
  at {project_dir}.meteor/local/build/programs/server/packages/oauth.js:691:1
  at {project_dir}.meteor/local/build/programs/server/packages/oauth.js:703:3
  at {project_dir}.meteor/local/build/programs/server/boot.js:419:36
  at Array.forEach (<anonymous>)
  at {project_dir}.meteor/local/build/programs/server/boot.js:228:19
  at {project_dir}.meteor/local/build/programs/server/boot.js:479:5
  at Function.run ({project_dir}.meteor/local/build/programs/server/profile.js:510:12)
  at {project_dir}.meteor/local/build/programs/server/boot.js:478:11

I’ve tried searching for routepolicy errors, no luck. I’ve done meteor reset and no luck.
I’ve trolled around a bunch of the ‘error when updated to 1.8x’ threads but still no luck.

Anyone able to point me in the right direction? Thank you!

it looks like you have a custom oauth or something.
Maybe try to open .meteor/local/build/programs/server/packages/routepolicy.js, add some debug before line 101 could help.

Looks like that message comes out of here:

Which is confusing since it says that conflict.url is undefined, when policy.urlPrefixMatches(urlPrefix, resource.url) returns true. The implementation of urlPrefixMatches should throw if url is undefined!

My first debugging step would be to do a meteor reset to make sure any old manifest is cleared and rebuilt.

My next step would be to download the meteor repo and copy /packages/routePolicy into your app’s /packages directory, so you can debug it directly.
If you run meteor --inspect-brk you should be able to connect the debugger and set breakpoints in routePolicy before resuming to figure out what’s going on at that point and what the conflicting resource in your static bundle is

1 Like

Thanks for honing in. meteor reset didn’t seem to clear it up, but I like the idea of putting the routePolicy local. I’ll give that a shot and report back.