[GH-ISSUE #55] False detection problem for some users #114

Closed
opened 2026-03-01 17:27:40 +03:00 by kerem · 1 comment
Owner

Originally created by @ykdsoft on GitHub (Dec 30, 2022).
Original GitHub issue: https://github.com/AEPKILL/devtools-detector/issues/55

Originally assigned to: @AEPKILL on GitHub.

Hi,

First of all, thanks for this awesome library.

I redirect the visitor if devtools open on my site. however some users reported me sometimes they redirect to homepage when reading the arcticle suddenly. and the number of users reporting in this way is increasing.

I am using latest version. Unfortunately I don't have a lot of information. but they usually report that they are using windows 10 chrome. Also the problem is not happen always, happen sometimes. What can i do?

Update: I collected some data from access log. Some browsers (parsed useragent):
Chrome 108 on iOS 16.1 Apple iPhone
Chrome 108 on Android 11
Chrome 108 on Android 12 Samsung SM-A217F
Safari 15.6 on iOS 15.7 Apple iPhone
Safari 12.1 on iOS 12.5 Apple iPhone
Chrome 108 on Android 11 Mi Note 10

Mostly android and ios seem to have problems.

My code:

function consoleCallback() {
	$("body").empty();
	
	if (window.location.pathname !== "/") {
		window.location.replace("/");
	}
}

devtoolsDetector.addListener(function(isOpen, detail) {
	if (isOpen)
	{
		if (detail.checkerName != "function-to-string") //for some mobile and ios false detect problem
		{
			consoleCallback();
		}
	}
});

devtoolsDetector.launch();

Thanks.

Originally created by @ykdsoft on GitHub (Dec 30, 2022). Original GitHub issue: https://github.com/AEPKILL/devtools-detector/issues/55 Originally assigned to: @AEPKILL on GitHub. Hi, First of all, thanks for this awesome library. I redirect the visitor if devtools open on my site. however some users reported me sometimes they redirect to homepage when reading the arcticle suddenly. and the number of users reporting in this way is increasing. I am using latest version. Unfortunately I don't have a lot of information. but they usually report that they are using windows 10 chrome. Also the problem is not happen always, happen sometimes. What can i do? Update: I collected some data from access log. Some browsers (parsed useragent): Chrome 108 on iOS 16.1 Apple iPhone Chrome 108 on Android 11 Chrome 108 on Android 12 Samsung SM-A217F Safari 15.6 on iOS 15.7 Apple iPhone Safari 12.1 on iOS 12.5 Apple iPhone Chrome 108 on Android 11 Mi Note 10 Mostly android and ios seem to have problems. My code: ``` function consoleCallback() { $("body").empty(); if (window.location.pathname !== "/") { window.location.replace("/"); } } devtoolsDetector.addListener(function(isOpen, detail) { if (isOpen) { if (detail.checkerName != "function-to-string") //for some mobile and ios false detect problem { consoleCallback(); } } }); devtoolsDetector.launch(); ``` Thanks.
kerem 2026-03-01 17:27:40 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Praskand commented on GitHub (Sep 22, 2024):

It may be closed if resolved!

<!-- gh-comment-id:2365600772 --> @Praskand commented on GitHub (Sep 22, 2024): It may be closed if resolved!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/devtools-detector#114
No description provided.