question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request History does not work with Channels

See original GitHub issue

Hello,

I remember in the past at one point I got the request history panel working, but now if I need to use it, it won’t work.

On the front end I have enabled: History, Versions, Time, and SQL panels.

Now if I click on the History tab, then there no rows. And if i click on the Refresh button, i get 400 error: image

I have no idea what I am doing wrong or how to troubleshoot that problem. Any suggestions, what should I try next?

Dependencies: Django==3.1.3 django_debug_toolbar==3.1.1

Edited:

Environment: Docker python:3.9.0-slim

Configuration:

settings.base.py

DJANGO_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles'
]
LOCAL_APPS = [
 . . .
]
THIRD_PARTY_APPS = [
    'channels',
    'rest_framework',
    'axes'
]

INSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS


MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'axes.middleware.AxesMiddleware' 
]

settings.development.py

import socket

from .base import *

DEBUG = True

AXES_ENABLED = False

# django-debug-toolbar
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"]
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[:-1] + '1' for ip in ips] + ['127.0.0.1', '10.0.2.2']
INSTALLED_APPS += ["debug_toolbar"]

. . .

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tim-schillingcommented, Jan 2, 2021

@KStenK There’s definitely a chance that the toolbar will not work with channels given it runs with multiple processes and the toolbar’s data is stored in memory.

1reaction
tim-schillingcommented, Jan 2, 2021

@KStenK You can get the request history panel to work with channels by setting RENDER_PANELS to False. The names of the functions and settings seems to be off here. The problem is that channels is setting request.META["wsgi.multiprocess"] to True. By configuring RENDER_PANELS to False, you’ll bypass that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

channels.history v2api not work · Issue #416 - GitHub
I was working on this and there are two things that I noted in my testing. 1) the "channel:history" permission needs to be...
Read more >
Why am I receiving a message that I am 'not authorized' to ...
A message saying that you are not authorized, need to re-authenticate, or that there was an authentication error, comes directly from your TV...
Read more >
Help! History Channel Live TV not working as expected
Solved: Does anyone else having issues with the Live Tv on The History Channel? Everything works on the app except that? Did everything...
Read more >
History Channel Issues - DIRECTV Community Forums
When I searched the series and went to record it, apparently it RECORDS it from the "on-demand" channel (1269) associated with the "regular" ......
Read more >
Call slack API conversations.history without inviting into ...
Which scopes does your App have in the workspace? You may have to re-install the app with channels:join and channels:history scopes, join the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found