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

Fatal error when using prebind #1502

Closed
andrei-pmbcn opened this issue Mar 19, 2019 · 4 comments

Comments

@andrei-pmbcn
Copy link

commented Mar 19, 2019

I am using prebind authentication. When I initialize converse, I receive the error "FATAL: TypeError: Cannot read property 'insertAdjacentElement' of null" that can be traced back to converse-register.js:57, where this.el.querySelector('.buttons') is set to null because, presumably, the querySelector function cannot find any elements. This error occurs when using prebind authentication but not login authentication.

I am writing it here on github because the lack of a clear error message that describes the problem on the user's end is something that ought to be resolved.

@jcbrand

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Did you modify any templates or change the code in any way?

@jcbrand jcbrand added the question label Mar 20, 2019

@andrei-pmbcn

This comment has been minimized.

Copy link
Author

commented Mar 20, 2019

No, I have used a fresh install of converse and have included converse.min.js and converse.css in the html file. Here is the converse.initialize script:

converse.initialize({
    locales_url: 'apps/view/javascript/converse/locale/ro/LC_MESSAGES/converse.json',
    bosh_service_url: 'http://localhost:5443/bosh',
    debug: true,
    prebind_url: 'http://localhost/index.php?[query string not shown for security reasons]',
    authentication: 'prebind',
    allow_logout: false,
    keepalive: true,
    message_carbons: true,
    play_sounds: true,
    roster_groups: true,
    show_controlbox_by_default: true,
    xhr_user_search: false
});

Note that I am also getting another error afterwards:

Uncaught (in promise) Error: restoreBOSHSession: tried to restore a "keepalive" session but we don't have the JID for the user!
    at Object.restoreBOSHSession (converse-core.js:1059)
    at Object.attemptPreboundSession (converse-core.js:1081)
    at Object.logIn (converse-core.js:1183)
    at D (converse-core.js:423)
    at Object.T.initialize (converse-core.js:1226)

EDIT: prebinding works fine using another client, jsxc, so my prebind link isn't the reason for the error.

EDIT2: using cdn-supplied .css and .js files produces the same error.

@chvanikoff

This comment has been minimized.

Copy link

commented Jun 17, 2019

Having the same errors. Any update on this?

@jcbrand

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

I believe this is fixed in a46ee4d

@jcbrand jcbrand closed this Jun 19, 2019

@jcbrand jcbrand added bug and removed question labels Jun 19, 2019

@jcbrand jcbrand added this to the 5.0.0 milestone Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.