Upgraded to 2.4 and I’m getting this error on hard reload, everything works fine but this error is in my server. I have not setup getPublicationStrategy. Is this required now?
I20210920-16:39:41.614(-7)? Exception in addedobserveChanges callback: TypeError: Cannot read property 'getPublicationStrategy' of undefined
I20210920-16:39:41.614(-7)? at PublishContext.added (packages/ddp-server/livedata_server.js:1330:30)
I20210920-16:39:41.615(-7)? at PublishContext.publish.added (packages/peerlibrary_subscription-scope/server.coffee:19:21)
I20210920-16:39:41.615(-7)? at added (packages/mongo/collection.js:396:13)
I20210920-16:39:41.615(-7)? at runWithEnvironment (packages/meteor.js:1320:24)
I20210920-16:39:41.615(-7)? at packages/meteor.js:1333:14
I20210920-16:39:41.616(-7)? at packages/mongo/observe_multiplex.js:204:9
I20210920-16:39:41.616(-7)? at _IdMap.forEach (packages/id-map/id-map.js:46:37)
I20210920-16:39:41.616(-7)? at ObserveMultiplexer._sendAdds (packages/mongo/observe_multiplex.js:196:22)
I20210920-16:39:41.616(-7)? at packages/mongo/observe_multiplex.js:50:12
I20210920-16:39:41.616(-7)? at runWithEnvironment (packages/meteor.js:1320:24)
I20210920-16:39:41.617(-7)? at Object.task (packages/meteor.js:1333:14)
I20210920-16:39:41.617(-7)? at Meteor._SynchronousQueue.SQp._run (packages/meteor.js:922:16)
I20210920-16:39:41.617(-7)? at packages/meteor.js:899:12
@flean and @saeeed
I’ve tried to reproduce this issue using the package peerlibrary_subscription-scope, but I wasn’t able to.
Is there any other package related to publications you guys are using?
I did not do anything to cause this error, all I did was update to version 4.
Note I use ssr using the react-router-ssr package
This is my list of packages :
meteor-base@1.5.1 # Packages every Meteor app needs to have
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.13.0 # The database Meteor supports right now
reactive-var@1.0.11 # Reactive variable for tracker
standard-minifier-js@2.7.0 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.15.3 # Enable ECMAScript2015+ syntax in app code
typescript@4.3.5 # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0 # Server-side component of the `meteor shell` command
static-html@1.3.2 # Define static page content in .html files
react-meteor-data # React higher-order component for reactively tracking Meteor data
npdev:react-loadable
accounts-base@2.1.0
accounts-password@2.1.0
server-render@0.4.0
communitypackages:picker
gadicohen:sitemaps
hot-module-replacement@0.3.0
alanning:roles
dev-error-overlay@0.1.1
ostrio:files
communitypackages:fast-render
juliancwirko:postcss
mizzao:user-status
communitypackages:react-router-ssr
@filipenevola and @renanccastro , I’ve started to narrow it down. It’s related to accounts, if I’m not logged in and hit refresh nothing happens. If I’m logged in and hit refresh on the browser it throws the error. I’ll setup an repo soon.
I don’t want to just patch the error avoiding using the server because I want to understand in which flow the server is undefined, I don’t think it should be undefined at this point. Maybe this new error is just highlighting an old problem in the code.