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

Message from non-roster contacts don't appear in fullscreen view_mode #1021

Open
nandinibhaduri opened this issue Feb 26, 2018 · 10 comments
Open

Comments

@nandinibhaduri
Copy link

nandinibhaduri commented Feb 26, 2018

I have allow_non_roster_messaging set to true. But when a non-roster contact sends a message, I am getting a browser notification alright, also a green bar shows up after the Contacts tab. But I could not see the message itself.

I am using dist/converse.js and dist/inverse.css, with view_mode: 'fullscreen'.

I am getting the following javascript errors in the console:

:8080/sounds/msg_received.ogg:1 GET http://localhost:8080/sounds/msg_received.ogg net::ERR_ABORTED
chat.jsp:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
:8080/logo/conversejs128.png:1 GET http://localhost:8080/logo/conversejs128.png 404 (Not Found)
msg_received.ogg:1 GET http://localhost:8080/sounds/msg_received.ogg 404 (Not Found)
conversejs128.png:1 GET http://localhost:8080/logo/conversejs128.png 404 (Not Found)
chat.jsp:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
converse.min.js:304 Uncaught TypeError: Cannot read property 'firstChild' of null
    at P.n.switchTab (converse.min.js:304)
    at n (converse.min.js:275)
    at HTMLDivElement.a (converse.min.js:283)

Any help will be deeply appreciated.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@jcbrand
Copy link
Member

jcbrand commented Feb 26, 2018

I think this use-case is not yet well handled in the fullscreen view, because without a roster contact, there's nothing in the left sidebar to click on to open the chat.

So even if the chat appeared, if you navigated to a different chat, you wouldn't be able to go back to the non-roster chat.

Secondly, looks like there is a bug. I guess the code wrongly assumes there to be a roster contact.
If you can give me a console traceback with the unminified code (i.e. with converse.js, not converse.min.js) then I can pinpoint exactly where this happens.

However, even if that bug gets fixed, the first issue still remains.

@nandinibhaduri
Copy link
Author

Here it is.

converse.js:48174 Uncaught TypeError: Cannot read property 'firstChild' of null
    at child.switchTab (converse.js:48174)
    at wrapper (converse.js:8882)
    at HTMLDivElement.handler (converse.js:38858)
switchTab @ converse.js:48174
wrapper @ converse.js:8882
handler @ converse.js:38858

@jcbrand
Copy link
Member

jcbrand commented Feb 28, 2018

@nandinibhaduri That doesn't make any sense to me. switchTab is called when the user clicks on a tab in the controlbox, not when a new message is received. Are you sure this is it? Any other errors? Also, what version of converse.js are you using?

@nandinibhaduri
Copy link
Author

nandinibhaduri commented Feb 28, 2018

This is when I am clicking on the green line on the tab to view the message. This one is the latest - 3.3.2.

@jcbrand
Copy link
Member

jcbrand commented Mar 4, 2018

@nandinibhaduri Do you also have the rooms tab? Or is allow_muc set to false?

Please paste your call to converse.initialize.

@nandinibhaduri
Copy link
Author

nandinibhaduri commented Mar 5, 2018

I have a rooms tab. Here is the settings -

converse.initialize({
	bosh_service_url: '<%=xmpp.getBindURL()%>',
	keepalive: true,
        authentication: 'prebind',
        allow_logout: false,
        jid: '<%=xmpp.getJid()%>',
        sid: '<%=xmpp.getSid()%>',
        rid: '<%=xmpp.getRid()%>',
        blacklisted_plugins: ['converse-minimize', 'converse-dragresize'],
        whitelisted_plugins: ['converse-inverse', 'converse-singleton'],
        allow_otr: false,
        roster_group: true,
        message_archiving: 'always',
        view_mode: 'fullscreen',
        allow_non_roster_messaging: true,
        hide_muc_server : true,
        muc_domain : 'conference.<%=xmpp.getDomain()%>'
});

@jcbrand
Copy link
Member

jcbrand commented Mar 5, 2018

Thanks @nandinibhaduri

I've made a small fix so that the TypeError no longer gets thrown, however this won't solve the underlying problem which is that the chat window for a non-roster contact doesn't appear.

Unfortunately that's a bigger task and not something I have free time for currently.

@jcbrand jcbrand changed the title Problem viewing non-roster message Message from non-roster contacts don't appear in fullscreen view_mode Mar 5, 2018
@jcbrand jcbrand added the bug label Mar 5, 2018
@mightymop
Copy link

It also affects the reception of broadcasts by the server... normaly noone has "the server" as a roster contact and if a broadcast was send, there will be no message to view in fullscreen mode too.

@pantunex
Copy link

Still happening with 4.1.0.

@postwar-toaster
Copy link

Still happening.

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

No branches or pull requests

5 participants