npm installer now works in every env (windows is included): npx meteor@beta; Because of how npm works now, we needed to update it to use npx; note that using npm i -g meteor@beta; it is still possible, but you need to pass the --foreground-script flag. The command for using npm became:
npm i -g meteor@beta --foreground-script
If you already have the npm package and want to use the npx option, you might need to use npx clear-npx-cache and ensure you are using node v20 or higher.
React skeleton works appropriately and out of the box;
Hello,
I have updated and I get this error with all my publications. I was not having the error with beta 6.
Something has changed in the check package ?
I20240326-15:44:21.266(1)? Exception from sub tasksForGantt id PTKkQFWB6MFKWRWvM Error: Did not check() all arguments during publisher 'tasksForGantt'
I20240326-15:44:21.266(1)? at ArgumentChecker.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:515:13)
I20240326-15:44:21.266(1)? at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:122:16)
I20240326-15:44:21.266(1)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1987:18)
I20240326-15:44:21.266(1)? at DDP._CurrentPublicationInvocation.withValue.name (packages/ddp-server/livedata_server.js:1183:11)
I20240326-15:44:21.266(1)? at EnvironmentVariableAsync.<anonymous> (packages/meteor.js:1288:23)
I20240326-15:44:21.266(1)? at packages/meteor.js:757:17
I20240326-15:44:21.267(1)? at AsyncLocalStorage.run (node:async_hooks:346:14)
I20240326-15:44:21.267(1)? at Object.Meteor._runAsync (packages/meteor.js:754:28)
I20240326-15:44:21.267(1)? at EnvironmentVariableAsync.withValue (packages/meteor.js:1282:19)
I20240326-15:44:21.267(1)? at Subscription._runHandler (packages/ddp-server/livedata_server.js:1180:60)
I20240326-15:44:21.267(1)? at Session._startSubscription (packages/ddp-server/livedata_server.js:991:16)
I20240326-15:44:21.267(1)? at Session.sub (packages/ddp-server/livedata_server.js:733:18)
I20240326-15:44:21.267(1)? at runHandlers (packages/ddp-server/livedata_server.js:651:58)
I20240326-15:44:21.267(1)? at processNext (packages/ddp-server/livedata_server.js:667:7)
I20240326-15:44:21.267(1)? at Session.processMessage (packages/ddp-server/livedata_server.js:670:5)
I20240326-15:44:21.267(1)? at SockJSConnection.<anonymous> (packages/ddp-server/livedata_server.js:1561:31)
I visit this issue soon. But I wonder if you could provide some reproduction steps on this issue or any additional detail on your app and set up, since we surely have tests covering check usage with basic publications, and tests were not failing. @dokithonon@harry73, Thanks
Anyway, I will just create few publications with check usage and see if I repro this. I will let you know here if I run into the same issue or I would need additional replication steps.
Hello,
Thanks for your help.
I created a simple repo : GitHub - dokithonon/meteor-test-async at meteor-3
But there is no error with the check package on this simple repo.
So there might be something more complex in our app that is causing the error
I can do a screensharing anytime if you want
EDIT :
When I look at the check package I can read this :
// We use getOrNullIfOutsideFiber so that it's OK to call check()
// from non-Fiber server contexts; the downside is that if you forget to
// bindEnvironment on some random callback in your method/publisher,
// it might not find the argumentChecker and you'll get an error about
// not checking an argument that it looks like you're checking (instead
// of just getting a "Node code must run in a Fiber" error).
It really looks like the cause of the error (but I don’t know waht to do with this)
EDIT 2 :
The check is working well in methods. The bug only occurs in publication
this.unblock() is available in publications so that long running publications will not block other publications when multiple pubs are called at the same time from the client
Thank you for providing more details on this issue.
This package ensures that any parameter passed to your publications must provide a type check, as stated in the documentation…
After integrating this package into my example app, we attempted several tests to replicate the issue.
Passing parameters without checks
If you pass a parameter without validating it using a check in the publication body, it will trigger the mentioned error. This package effectively forces you specifying a check, such as check(param, Match.Any) or a more generic check(arguments, [Match.Any]). Properly defining the check should resolve this issue.
Passing a parameter checked as a string
In my publication, I specified two parameters: a number and a string. However, when passing a numeric string from the client’s subscribe call, it throws the same error. It appears that the package does not handle numeric strings well, treating them only as alphanumeric strings.
As depicted in the image below, this time I encountered the aforementioned error along with another validation error.
Is this what you get on your issue? I think this is off and numeric strings should properly be validated.
If you don’t get this other validation logs, it is a different issue. Could you (@harry73, @dokithonon) share the check interface of the afftected publication and how you call it on the client, or try to examplify in a small repo in order to exacly get the issue you get?