Skip to content

Debugging

Benny Neugebauer edited this page Mar 11, 2020 · 12 revisions

Enable Debugging logs

You can enable debug logs on https://app.wire.com/ do the following:

  1. Enter window.localStorage.debug="@wireapp/*" in JS Console
  2. Refresh Browser window

Debug Snippets

Get the latest 5 messages for the current conversation from the database:

wire.app.repository.storage.storageService.db['events'].toArray(records => {
  const messages = records.filter(events => events.conversation === wire.app.repository.conversation.active_conversation().id);
  console.log(messages.slice(-5).reverse());
});

Note: Latest message is at array index 0.

Link Previews

Since link previews cannot be generated directly in the webapp (due to CORS constraints), we have a way to generate fake link previews when a message with a link is send.

To enable this behavior, in the console, run

wire.app.util.debug.enableLinkPreviews()

The next message you are going to send (that contains a URL), will generate a fake link preview.

Database

IndexedDB

Tools

Documentation

Connection

Check if WebSocket is connected

wire.app.service.web_socket.socket.readyState
  • 0 — connection not yet established
  • 1 — conncetion established
  • 2 — in closing handshake
  • 3 — connection closed or could not open

Delete all cached data

Delete IndexedDB

On Windows, remove everything from here:

%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\IndexedDB

On Linux, the folder is located at:

/home/[USERNAME]/.config/google-chrome/Default/IndexedDB/

On Mac, do the following:

  1. In Chrome, go to "Settings" (or "Preferences" under the Chrome menu)
  2. Click "show advanced settings" (at the bottom of the page)
  3. Go to "Privacy" > "Content Settings" > "All cookies and Site Data" > find the domain where you created the IndexedDB
  4. Hit either the "X" or click "Indexed Database" > Remove

Disable Web Security

  • "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="c:/chromedev"

image

Wire is opened in another tab

Delete cookie "app_opened" from your Browser's Cookies:

Screenshot