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

ERROR: Future resolved more than once #23

Open
derek-fong opened this issue Jul 18, 2016 · 8 comments
Open

ERROR: Future resolved more than once #23

derek-fong opened this issue Jul 18, 2016 · 8 comments

Comments

@derek-fong
Copy link

derek-fong commented Jul 18, 2016

AD Authentication works fine without LDAP_DEFAULTS.searchResultsProfileMap specified but when I try to add profileProperty to LDAP_DEFAULTS.searchResultsProfileMap it throws

Error: Future resolved more than once

Here is my client and server code

// Client
    let connectionSettings = {
      dn: 'myDomain\\' + userName,       
      search: '(sAMAccountName=' + userName + ')'
    };

    Meteor.loginWithLDAP(userName, password, connectionSettings, function(err) {
      if (err) {
        console.error(err.reason);
      } else {
        console.info('login success. ');
      }
    });
// Server
  LDAP_DEFAULTS.url = 'ldap://my.company.com';
  LDAP_DEFAULTS.base = 'DC=my,DC=company,DC=com';
  LDAP_DEFAULTS.defaultDomain = 'my.company.com';
  LDAP_DEFAULTS.searchResultsProfileMap = [
    {
      resultKey: 'c',
      profileProperty: 'Country'
    }
  ];
@benco5
Copy link

benco5 commented Aug 5, 2016

Yes, also getting this with recent upgrade to 1.0.1 for my company's Meteor project template. Eek! Any known fix?

@benco5
Copy link

benco5 commented Aug 8, 2016

Hey @derek-fong, @etyp and Future Readers,

I noticed that the github repo package code appears ahead of what meteor add .. is provides (1.1.0 vs. 1.0.0?). Not only that, when I clone the repo and add the package manually to my app under /packages I did not have this double resolve issue. I believe this is because a bug fix for this was merged a while back (December 2015-ish), but may not have made it to Atmosphere.

Anyway, unless things change, future readers may want to just git clone and add the package manually to avoid this "future resolved more than once" bug that still seems to exist in the version available on Meteor's packaging (which sounds like is going away anyway).

@edsoubsoub
Copy link

edsoubsoub commented Sep 7, 2016

I've got the same problem with Future.
Unfortunately I failed when trying using this package inside /packages directory :
package.js:20:7: Invalid 'where' argument: 'accounts-password'
and when I change this in package.js :
api.imply('accounts-base', 'accounts-password', ['client', 'server']);
by :
api.imply(['accounts-base', 'accounts-password'], ['client', 'server']);
I've got now this error in my server.js:
ReferenceError: LDAP_DEFAULTS is not defined

Anyone fix this ?

Thx

@derek-fong
Copy link
Author

@edsoubsoub Can't remember exactly how I solved this problem but I think what I did was forked this repo into my project and modified package.json

// api.imply('accounts-base', 'accounts-password', ['client', 'server']);
api.use('accounts-base', 'server');  // Change to this 

and installed accounts-password from my main project.

@conrad-dk
Copy link
Collaborator

@derek-fong

If I do that, for some reason it looks as though the api.addFiles calls are not run...
TypeError: Meteor.loginWithLDAP is not a function(…)

@aessig
Copy link

aessig commented Feb 6, 2017

Any update on this issue ? I have the same problem

@conrad-dk
Copy link
Collaborator

Have you tried the fork at https://github.com/ayselafsar/meteor-accounts-ldap ?

If that one works for you, I will merge it into this repo.

@derek-fong
Copy link
Author

@conrad-dk Was trying to test this package but when I tried to install the package meteor add typ:accounts-ldap on a fresh meteor project just now it fails with the error message below:

meteor add typ:accounts-ldap
 => Errors while adding packages:

While loading package typ:ldapjs@0.7.3:
error: Command failed:
<user_profile_path>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\d
ev_bundle\bin\npm.cmd
rebuild --update-binary
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed
with exit code: 1
gyp ERR! stack     at ChildProcess.onExit
(<user_profile_path>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\
dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit
(internal/child_process.js:211:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\bin\\node.exe"
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
gyp ERR! cwd
<user_profile_path>\AppData\Local\.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\.temp-9f
gckk\node_modules\ldapjs\node_modules\dtrace-provider
gyp ERR! node -v v4.7.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

npm ERR! Windows_NT 6.1.7601
npm ERR! argv
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\bin\\node.exe"
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js"
"rebuild" "--update-binary"
npm ERR! node v4.7.3
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dtrace-provider@0.2.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dtrace-provider@0.2.8 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dtrace-provider package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs dtrace-provider
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls dtrace-provider
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!
<user_profile_path>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\d
ev_bundle\.npm\_logs\2017-04-10T07_22_36_390Z-debug.log
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed
with exit code: 1
gyp ERR! stack     at ChildProcess.onExit
(<user_profile_path>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\
dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit
(internal/child_process.js:211:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\bin\\node.exe"
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
gyp ERR! cwd
<user_profile_path>\AppData\Local\.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\.temp-9f
gckk\node_modules\ldapjs\node_modules\dtrace-provider
gyp ERR! node -v v4.7.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

npm ERR! Windows_NT 6.1.7601
npm ERR! argv
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\bin\\node.exe"
"<user_profile_path>\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.3_2\\mt-os.window
s.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js"
"rebuild" "--update-binary"
npm ERR! node v4.7.3
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dtrace-provider@0.2.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dtrace-provider@0.2.8 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dtrace-provider package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs dtrace-provider
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls dtrace-provider
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!
<user_profile_path>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\d
ev_bundle\.npm\_logs\2017-04-10T07_22_36_390Z-debug.log

Suspect package typ:ldapjs@0.7.3 is causing the problem?

$ meteor --version
Meteor 1.4.3.2
$ meteor node --version
v4.7.3

Tried on to install this package on Windows, MacOS and Linux VM and they all return with the same error - Any ideas? :)

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