Cannot register new user android asmack "Unable To Generate CAPTCHA"

fazal ur-rehman-sharif

I am using asmack (XMPP) framework for android with ejabbered server. The Problem i am having is that when i try to register a new user through AccountManager i have an error from server that "Unable To Generate CAPTCHA" why server is telling this and do we need CAPTCHA and how can i implement captcha in asmack.

Here is my Code for creating a new User.

Language : Android Please HELP!

public void regesterNewUser(String newUserId, String password){

    if(!connection.isAuthenticated()){

        AccountManager accountManager = connection.getAccountManager();
        Collection<String> acAtr = accountManager.getAccountAttributes();
        System.out.println("Account Instructions = "+accountManager.getAccountInstructions());
        for (String string : acAtr) {

            System.out.println("ACCNT ATR = "+string);
        }
		HashMap<String,String> aParams = new HashMap<String,String>();
		if(accountManager.supportsAccountCreation()){

            try {

                accountManager.createAccount(newUserId, password);
            } catch (XMPPException e) {

                // TODO Auto-generated catch block
                		e.printStackTrace();
            }
        }
    }
}
Here is my error LOG

11-24 15:00:47.720: D/SMACK(11227): 03:00:47 PM SENT (1110481016): <iq id="237lI-0" to="localhost" type="get"><query xmlns="jabber:iq:register"></query></iq>
11-24 15:00:48.100: D/SMACK(11227): 03:00:48 PM RCV  (1110481016): <iq from='localhost' id='237lI-0' type='error'><query xmlns='jabber:iq:register'/><error code='500' type='wait'><internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Unable to generate a CAPTCHA</text></error></iq>
11-24 15:00:48.110: W/System.err(11227): internal-server-error(500) Unable to generate a CAPTCHA
11-24 15:00:48.120: W/System.err(11227): 	at org.jivesoftware.smack.AccountManager.getRegistrationInfo(AccountManager.java:331)
11-24 15:00:48.120: W/System.err(11227): 	at org.jivesoftware.smack.AccountManager.getAccountAttributes(AccountManager.java:132)
11-24 15:00:48.120: W/System.err(11227): 	at com.example.xmpp.ConnectionMaker.regesterNewUser(ConnectionMaker.java:218)
11-24 15:00:48.120: W/System.err(11227): 	at com.example.xmpp.LoginScreenActivity.onActivityResult(LoginScreenActivity.java:89)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.Activity.dispatchActivityResult(Activity.java:5372)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3212)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3259)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.ActivityThread.access$1200(ActivityThread.java:140)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1285)
11-24 15:00:48.120: W/System.err(11227): 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-24 15:00:48.120: W/System.err(11227): 	at android.os.Looper.loop(Looper.java:174)
11-24 15:00:48.120: W/System.err(11227): 	at android.app.ActivityThread.main(ActivityThread.java:4952)
11-24 15:00:48.120: W/System.err(11227): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-24 15:00:48.120: W/System.err(11227): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-24 15:00:48.120: W/System.err(11227): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
11-24 15:00:48.120: W/System.err(11227): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
11-24 15:00:48.120: W/System.err(11227): 	at dalvik.system.NativeStart.main(Native Method)
11-24 15:00:48.130: D/SMACK(11227): 03:00:48 PM SENT (1110481016): <iq id="237lI-1" to="localhost" type="get"><query xmlns="jabber:iq:register"></query></iq>
11-24 15:00:48.610: D/SMACK(11227): 03:00:48 PM RCV  (1110481016): <iq from='localhost' id='237lI-1' type='error'><query xmlns='jabber:iq:register'/><error code='500' type='wait'><internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Unable to generate a CAPTCHA</text></error></iq>
11-24 15:00:48.610: I/System.out(11227): Account Instructions = null
11-24 15:00:48.620: D/SMACK(11227): 03:00:48 PM SENT (1110481016): <iq id="237lI-2" to="localhost" type="set"><query xmlns="jabber:iq:register"><email>krishna@localhost</email><password>123456krishna</password><username>krishna</username><name>krishnathakkar</name></query></iq>
11-24 15:00:48.980: D/SMACK(11227): 03:00:48 PM RCV  (1110481016): <iq from='localhost' id='237lI-2' type='error'><query xmlns='jabber:iq:register'><email>krishna@localhost</email><password>123456krishna</password><username>krishna</username><name>krishnathakkar</name></query><error code='405' type='cancel'><not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
11-24 15:00:48.980: W/System.err(11227): not-allowed(405)
11-24 15:00:48.980: W/System.err(11227): 	at org.jivesoftware.smack.AccountManager.createAccount(AccountManager.java:243)
11-24 15:00:48.980: W/System.err(11227): 	at com.example.xmpp.ConnectionMaker.regesterNewUser(ConnectionMaker.java:231)
11-24 15:00:48.980: W/System.err(11227): 	at com.example.xmpp.LoginScreenActivity.onActivityResult(LoginScreenActivity.java:89)
11-24 15:00:48.980: W/System.err(11227): 	at android.app.Activity.dispatchActivityResult(Activity.java:5372)
11-24 15:00:48.980: W/System.err(11227): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3212)
11-24 15:00:48.980: W/System.err(11227): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3259)
11-24 15:00:48.980: W/System.err(11227): 	at android.app.ActivityThread.access$1200(ActivityThread.java:140)
11-24 15:00:48.980: W/System.err(11227): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1285)
11-24 15:00:48.980: W/System.err(11227): 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-24 15:00:48.980: W/System.err(11227): 	at android.os.Looper.loop(Looper.java:174)
11-24 15:00:48.990: W/System.err(11227): 	at android.app.ActivityThread.main(ActivityThread.java:4952)
11-24 15:00:48.990: W/System.err(11227): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-24 15:00:48.990: W/System.err(11227): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-24 15:00:48.990: W/System.err(11227): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
11-24 15:00:48.990: W/System.err(11227): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
11-24 15:00:48.990: W/System.err(11227): 	at dalvik.system.NativeStart.main(Native Method)
11-24 15:00:49.010: I/Choreographer(11227): Skipped 78 frames!  The application may be doing too much work on its main thread.
11-24 15:00:49.020: I/(11227): ION_IOC_IMPORT success c3e2f880,phy addr = 8f2ce000
11-24 15:00:49.060: W/IInputConnectionWrapper(11227): getSelectedText on inactive InputConnection
11-24 15:00:49.080: I/(11227): ION_IOC_FREE success ddaf2800,phy addr = 8f445000
11-24 15:00:49.080: I/(11227): ION_IOC_FREE success d41eda40,phy addr = 8ee69000
11-24 15:00:49.080: I/(11227): ION_IOC_FREE success c1db3640,phy addr = 8efe0000
11-24 15:00:49.080: I/(11227): ION_IOC_FREE success c1db3f00,phy addr = 8f157000
11-24 15:00:49.100: W/IInputConnectionWrapper(11227): setComposingText on inactive InputConnection
11-24 15:00:49.540: I/(11227): ION_IOC_IMPORT success ddde8bc0,phy addr = 8ee69000
11-24 15:00:50.040: I/(11227): ION_IOC_IMPORT success ddde89c0,phy addr = 8efe0000
11-24 15:00:50.550: I/(11227): ION_IOC_IMPORT success de61fb40,phy addr = 8f157000
11-24 15:01:00.920: W/IInputConnectionWrapper(11227): getSelectedText on inactive InputConnection
11-24 15:01:00.920: W/IInputConnectionWrapper(11227): setComposingText on inactive InputConnection
11-24 15:01:37.240: W/IInputConnectionWrapper(11227): getSelectedText on inactive InputConnection
11-24 15:01:37.250: W/IInputConnectionWrapper(11227): setComposingText on inactive InputConnection
11-24 15:01:41.580: D/SMACK(11227): 03:01:41 PM SENT (1110481016):  
11-24 15:02:11.580: D/SMACK(11227): 03:02:11 PM SENT (1110481016):  
11-24 15:02:19.580: D/SMACK(11227): 03:02:19 PM SENT (1110481016): <presence id="237lI-3" type="unavailable"></presence>
11-24 15:02:19.740: W/System.err(11227): javax.net.ssl.SSLException: Read error: ssl=0x4fc1cff8: I/O error during system call, Connection timed out
11-24 15:02:19.740: W/System.err(11227): 	at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
11-24 15:02:19.740: W/System.err(11227): 	at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:651)
11-24 15:02:19.740: W/System.err(11227): 	at java.io.InputStreamReader.read(InputStreamReader.java:244)
11-24 15:02:19.750: W/System.err(11227): 	at java.io.BufferedReader.read(BufferedReader.java:310)
11-24 15:02:19.750: W/System.err(11227): 	at org.jivesoftware.smack.util.ObservableReader.read(ObservableReader.java:42)
11-24 15:02:19.750: W/System.err(11227): 	at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1496)
11-24 15:02:19.750: W/System.err(11227): 	at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:979)
11-24 15:02:19.750: W/System.err(11227): 	at org.kxml2.io.KXmlParser.next(KXmlParser.java:346)
11-24 15:02:19.750: W/System.err(11227): 	at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
11-24 15:02:19.750: W/System.err(11227): 	at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:320)
11-24 15:02:19.750: W/System.err(11227): 	at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
11-24 15:02:19.760: W/System.err(11227): 	at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:69)
11-24 15:02:20.890: D/dalvikvm(11227): GC_CONCURRENT freed 982K, 18% free 10054K/12231K, paused 3ms+3ms, total 59ms

legoscia

As the error stanza says, this is an internal server error. The server is not able to generate a CAPTCHA for the registration form for some reason. You'll have to ask the server administrator to have a look at the configuration.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot register a new user account in Jabberd by XMPPFramework

From Dev

Create new user with more attribute in asmack

From Dev

Using Facebook to register new User on Android App

From Dev

Cannot POST /user/register

From Dev

Register a new user on firebase

From Dev

XMPP register new user

From Dev

Android with Asmack -How to check user presence status in XMPP in android?

From Dev

Android Send User Latitude And Longitude On Xmpp Server Using ASmack

From Dev

Register new user with laravel as an API

From Dev

aSmack Android documentation and debugging

From Dev

Cannot add a new user

From Dev

Cannot add a new user

From Dev

Cannot log in to new user

From Dev

Web API 2 cannot register user

From Dev

Localhost cannot handle request PDO register user

From Dev

Quickblox - How to register New user in QuickBlox API

From Dev

Ejabberd can't register new user

From Dev

Quickblox - How to register New user in QuickBlox API

From Dev

Wordpress Create Custom Post on New User Register

From Dev

Why I failed to register new user on Firebase?

From Dev

android Unable to add friends in asmack

From Dev

How to implement DeliveryReceiptManager in Android aSmack

From Dev

How to implement DeliveryReceiptManager in Android aSmack

From Dev

Android Cannot Connect to Server to Register or Login

From Dev

Register user to QuickBlox Users from android

From Dev

Cannot connect to instance with new user

From Dev

openSuse, new user cannot login

From Dev

Android new user tutorial

From Dev

Android new user tutorial