Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor,Accounts.callLoginMethod()不';t在移动设备上调用自定义登录处理程序_Meteor - Fatal编程技术网

Meteor,Accounts.callLoginMethod()不';t在移动设备上调用自定义登录处理程序

Meteor,Accounts.callLoginMethod()不';t在移动设备上调用自定义登录处理程序,meteor,Meteor,我的代码在桌面浏览器和android emulator上可以正常工作,但在android设备上无法正常工作(通过USB调试模式) 我已经在服务器代码中注册了自定义登录处理程序 Accounts.registerLoginHandler("customLoginHandler", function (options) { console.log("customLoginHandler()"); }); 然后在特定的UI事件上,我从客户端代码调用它 console.log("calling

我的代码在桌面浏览器和android emulator上可以正常工作,但在android设备上无法正常工作(通过USB调试模式)

我已经在服务器代码中注册了自定义登录处理程序

Accounts.registerLoginHandler("customLoginHandler", function (options) {
    console.log("customLoginHandler()");
});
然后在特定的UI事件上,我从客户端代码调用它

console.log("calling custom login");

Accounts.callLoginMethod({
    methodArguments: [ {clientUser: "hello", clientPassword: "world"} ],
    userCallback: function() {
        console.log("clientCustomLogin callback");
    }
});

console.log("done");
在桌面或android emulator上运行此代码时的控制台输出

customLoginHandler()
移动电话

calling custom login
done
整个客户端代码位于内部

if (Meteor.isClient) {
街区。为什么输出如此不同

Meteor版本1.1.0.2,服务器操作系统-Linux,移动-安卓4.4.2

Meteor由以下命令启动:

meteor run android-device
已安装的软件包:

$ meteor list
accounts-base    1.2.0  A user account system 
http             1.1.0  Make HTTP calls to remote servers
meteor-platform  1.2.2  Include a standard set of Meteor packages in your app
twbs:bootstrap   3.3.4  The most popular front-end framework for developing responsive, mobile first projects on the web.

简短回答:删除android上的应用程序,然后运行meteor run android设备

只要有人

我不知道为什么可能,但看起来移动设备上的应用程序没有完全更新(或者根本没有从某个点开始更新)

我在重新安装accounts base、accounts password和accounts ui软件包,但后来我注意到,当我用标准的{{>loginButtons}}(在主html文件中)替换我的模板时,meteor重新运行并在android上刷新应用程序后,手机上没有任何变化

然后我从android上删除了这个应用程序,再次启动了meteor


之后,应用程序开始按预期工作。

简短回答:在android上删除应用程序,然后运行meteor run android设备

只要有人

我不知道为什么可能,但看起来移动设备上的应用程序没有完全更新(或者根本没有从某个点开始更新)

我在重新安装accounts base、accounts password和accounts ui软件包,但后来我注意到,当我用标准的{{>loginButtons}}(在主html文件中)替换我的模板时,meteor重新运行并在android上刷新应用程序后,手机上没有任何变化

然后我从android上删除了这个应用程序,再次启动了meteor

之后,应用程序开始按预期工作