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

Accounts.onEmailVerificationLink throws console warning when being used #11116

Closed
dcantatore opened this issue Jul 8, 2020 · 10 comments
Closed

Comments

@dcantatore
Copy link

When you use Accounts.onEmailVerificationLink() on the client side as instructed, in the console it says:

Accounts.onEmailVerificationLink was called more than once. Only one callback added will be executed.

The meteor doc around it is:
https://docs.meteor.com/api/passwords.html#Accounts-onEmailVerificationLink

It says "This function should be called in top-level code". Which it is, so I'm not sure where else I would put it to avoid this bug

I have seen this mentioned as a feature request but this is a bug

@stale
Copy link

stale bot commented Aug 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Aug 9, 2020
@dcantatore
Copy link
Author

This is ignored not stale

@stale stale bot removed the stale-bot label Aug 10, 2020
@StorytellerCZ
Copy link
Collaborator

@dcantatore Can you share with us list of packages you are using? Just to cover all our bases.

@dcantatore
Copy link
Author

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.1.0       # Packages for a great mobile UX
mongo@1.9.0                   # The database Meteor supports right now
blaze-html-templates    # Compile .html files into Meteor Blaze views
jquery                  # Wrapper package for npm-installed jquery
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.2.0                 # Meteor's client-side reactive programming library

standard-minifier-css@1.6.0   # CSS minifier run for production mode
standard-minifier-js@2.6.0    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.14.2              # Enable ECMAScript2015+ syntax in app code
typescript@3.7.5              # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0            # Server-side component of the `meteor shell` command

kadira:blaze-layout     # Layout manager for blaze (works well with FlowRouter)
less@2.8.0                    # Leaner CSS language

meteortesting:mocha               # A package for writing and running your meteor app and package tests with mocha
johanbrook:publication-collector  # Test a Meteor publication by collecting its output
tmeasday:publish-counts
random@1.2.0
natestrauser:publish-performant-counts
sibylsurveys:query-builder
http@1.4.2
accounts-ui@1.3.1
accounts-password@1.6.0
underscore@1.0.10
littledata:synced-cron
email
ostrio:flow-router-extra
ostrio:flow-router-title
ostrio:flow-router-meta
server-render

@filipenevola
Copy link
Collaborator

Hi, could you provide a reproduction? 😉 Read more here

@dcantatore
Copy link
Author

Hi @filipenevola ,

It's really simple, create a new meteor project and add:

Accounts.onEmailVerificationLink((token, done) => {
    Accounts.verifyEmail(token, (err) => {
        if (err) {
            console.log('Error: ', err);
        } else {
            done();
            console.log('Success');

        }
    });
});

It can be put in any top level code 'This function should be called in top-level code, not inside Meteor.startup().' as stated here:
https://docs.meteor.com/api/passwords.html#Accounts-onEmailVerificationLink

@cfnelson
Copy link
Contributor

cfnelson commented Sep 4, 2020

Could be related to this reported problem/bug : [1.8.3] onLogin handler fired twice #10853

The above onLogin handler fired twice bug was reported to be related to this code change & commit: Simplify _startupCallback by passing callback rather than ID. (ec0ed4d)

Which was introduced in this PR #10543 which was resolving this bug/issue: #10157

@stale
Copy link

stale bot commented Oct 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Oct 31, 2020
@stale
Copy link

stale bot commented Nov 9, 2020

This issue has been automatically closed it has not had recent activity.

@stale stale bot closed this as completed Nov 9, 2020
@carlosalvidrez
Copy link

I also have this issue. I understand there may not be an easy way to reproduce this, but thought I'd chime in for the record.

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

No branches or pull requests

5 participants