New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 835726 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 835287
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

chrome.runtime.sendMessage not working after Chrome update

Reported by ttplsha...@gmail.com, Apr 23 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
after updatating chrome to Version 66.0.3359.117 (Official Build) (32-bit)
chrome.runtime.sendMessage not working 

What is the expected behavior?

What went wrong?
after updatating chrome to Version 66.0.3359.117 (Official Build) (32-bit)
chrome.runtime.sendMessage not working 

Did this work before? Yes before after updating chrome to Version 66.0.3359.117 (Official Build) (32-bit) 

Chrome version: 66.0.3359.117  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 

Comment 1 by woxxom@gmail.com, Apr 23 2018

It's working in other extensions so there must be something else in your case. If you can't provide a demo extension that shows the problem, there's nothing to do here, I'm afraid. 
using this line its working before chrome update 

code : 

const VFD = {
	extensionId: "myid",
	strPort: port,
	strFirstLine: " WELCOME",
	strSecondLine: "",
	write: function(strFirstLine, strSecondLine) {
		if (typeof chrome != "undefined") {
			this.strFirstLine = strFirstLine;
			this.strSecondLine = strSecondLine;

			if (this.strPort != "" && this.strFirstLine != "") {
				var messageToken = {
					"port": this.strPort,
					"firstLine": this.strFirstLine,
					"secondLine": this.strSecondLine,
				}

				chrome.runtime.sendMessage(this.extensionId, messageToken, this.onSend);
			}
		}
	},
	onSend: function(response) {

	},

error message : TypeError: Cannot read property 'sendMessage' of undefined


Comment 3 Deleted

Comment 4 by woxxom@gmail.com, Apr 23 2018

This part of code doesn't help to diagnose the underlying problem, unfortunately. 
can you please tell me if anything which is related to extension has been added in this latest version of chrome .

because i am not able to see any thing which is related to extension is listed in chrome release note. 

Comment 6 by woxxom@gmail.com, Apr 23 2018

Each release adds dozens of internal changes that affect extensions. Like I said, without an actual extension that demonstrates the problem, nothing can be done here. 
i am trying all function which is related to chrome.runtime but not working

PFA
chrome.png
53.5 KB View Download

Comment 8 by woxxom@gmail.com, Apr 23 2018

You can try finding the cause yourself:
https://www.chromium.org/developers/bisect-builds-py
Labels: Needs-Triage-M66
Cc: krajshree@chromium.org
Labels: Needs-Feedback Triaged-ET
ttplshared@ - Thanks for filing the issue...!!

Could you please provide a sample test file/url to test the issue from TE-end.
This will help us in triaging the issue further.

Thanks...!!
java script code using at my end :

const VFD = {
	extensionId: "myid",
	strPort: port,
	strFirstLine: " WELCOME",
	strSecondLine: "",
	write: function(strFirstLine, strSecondLine) {
		if (typeof chrome != "undefined") {
			this.strFirstLine = strFirstLine;
			this.strSecondLine = strSecondLine;

			if (this.strPort != "" && this.strFirstLine != "") {
				var messageToken = {
					"port": this.strPort,
					"firstLine": this.strFirstLine,
					"secondLine": this.strSecondLine,
				}

				chrome.runtime.sendMessage(this.extensionId, messageToken, this.onSend);
			}
		}
	},
	onSend: function(response) {

	},

};




chrome extension code : 

PFA for chrome extension files
manifest.json
341 bytes View Download
scripts.js
3.2 KB View Download

The error occur in my client side(javascript) code on chrome.runtime.sendMessage(this.extensionId, messageToken, this.onSend); this line 

even i am trying to access any methos or properties of chrome.runtime it gives type error

i think problem is not with the extention code problem is with "chrome.runtime" 
Project Member

Comment 13 by sheriffbot@chromium.org, Apr 24 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
u can try at u r end only call "chrome.runtime.id" in javascript 

it also gives type error
Components: -Blink Platform>Extensions>API
Summary: chrome.runtime.sendMessage not working after Chrome update (was: chrome.runtime.sendMessage not working afre crome update )
Mergedinto: 835287
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment