ardatan / ardatan/meteor-webpack

Error: Meteor code must always run within a Fiber

Open
#66 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
123
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I get this error when I use `Meteor.user()` inside `withTracker` functions, **only on server**.

```
Error running template: Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.
```
It happens at this line in the `react-meteor-data` package: https://github.com/meteor/react-packages/blob/796a075a4bbb36212e6a74c9f3576b119d31c474/packages/react-meteor-data/ReactMeteorData.jsx#L34

Meteor.bindEnvironment can't be used because it eats up the return values.

Any ideas for solving this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at packages/react-meteor-data/ReactMeteorData.jsx line 34 and reproduce the server-side withTracker call that uses Meteor.user(). Investigate how the Fiber error arises and whether the existing Meteor.bindEnvironment behavior affects return values; done means the server case runs without the Fiber error while preserving the expected return value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.