Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] if a node_helper has an init function, the 'this' pointer is not set #3708

Open
3 of 4 tasks
sdetweil opened this issue Jan 30, 2025 · 5 comments
Open
3 of 4 tasks
Labels

Comments

@sdetweil
Copy link
Collaborator

Environment

System information:

SYSTEM: manufacturer: Apple Inc.; model: Macmini; virtual: false

OS: platform: darwin; distro: macOS; release: 14.5; arch: arm64; kernel: 23.5.0

VERSIONS: electron: 32.2.1; used node: 20.18.0; installed node: 18.20.5; npm: 10.8.2; pm2: 5.4.2

OTHER: timeZone: America/Denver; ELECTRON_ENABLE_GPU: undefined

Which start option are you using?

npm run start

Are you using PM2?

No

Module

None

Have you tried disabling other modules?

  • Yes
  • No

Have you searched if someone else has already reported the issue on the forum or in the issues?

  • Yes

What did you do?

        init: function(){
                Log.log(this.name + " is in init!");
        },

from the doc

init()
This method is called when a module gets instantiated. In most cases you do not need to subclass this method.

What did you expect to happen?

I expected a log message (using my brithdaylist module)

birthdaylist is in init

What actually happened?

undefined is in init

Additional comments

No response

Participation

  • I am willing to submit a pull request for this change.
@sdetweil sdetweil added the bug label Jan 30, 2025
@khassel
Copy link
Collaborator

khassel commented Jan 30, 2025

Had same problem in a module last week. Found a solution and can provide a PR (but it's o.k. for me if you want to implement this) ...

@sdetweil
Copy link
Collaborator Author

no, if you got it, go

@sdetweil
Copy link
Collaborator Author

i tried to open this issue from my phone, but it wouldnt let me NOT fill in the system info section. so i had to get out my laptop, run MagicMirror again to get it

@KristjanESPERANTO
Copy link
Contributor

i tried to open this issue from my phone, but it wouldnt let me NOT fill in the system info section. so i had to get out my laptop, run MagicMirror again to get it

Which browser did you use? I just checked with Chrome on Android and the system info section was editable.

@sdetweil
Copy link
Collaborator Author

sdetweil commented Jan 31, 2025

I did not HAVE the info on my phone, and my computer was put away due to travel.

I figured I could edit it later to paste in the info, which is not relevant to this problem.

I tried to put some stuff in, but that didn't help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants