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

Issue 672565 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Translating page to English status stuck forever on a specific webpage

Project Member Reported by srikanthg@chromium.org, Dec 8 2016

Issue description

App Version: 56.0.2924.20 beta
iOS Version: 10.1.1, 10.2
Device: iPhone6, iPhone7
URL: https://whatsapp.com/?l=pt_br https://mail.ru 

Steps to reproduce:
  1. Launch Google Chrome Canary
  2. Navigate to the above sites
  3. Once the infobar is displayed tap on Translate

Observed results: "Translating page to English…" text is displayed forever

Expected results: Page should be translated or a server error infobar be displayed

Number of times you were able to reproduce: 5/5
Bug reproducible after clean install: Yes
Bug reproducible after clearing cache and cookies: Yes
Bug reproducible on Chrome Mobile on Android: Not tested
Bug reproducible on Safari/Firefox: Firefox: NA, Safari: NA
Bug reproducible on current stable build (App Version, iOS Version): M55 Yes
Bug reproducible on the current beta channel build (App Version, iOS Version): M56 Yes

Link to video/image: https://drive.google.com/file/d/0B-xmXLQhjeKuZ0duazl3UW9vVEE/view 
 
Cc: jif@chromium.org
Owner: sdefresne@chromium.org
Status: Assigned (was: Untriaged)
Labels: -found-in-56 found-in-m56
Labels: Hotlist-TranslateiOS
srikanthg@ - are you still observing this issue on the newer builds?
Cc: pkl@chromium.org
pkl and I just repro-ed it on the whatsapp site. Hangs forever.

Comment 5 by pkl@chromium.org, Apr 18 2017

Cc: ftang@chromium.org sdefresne@chromium.org yyushkina@chromium.org
Owner: ----
Status: Available (was: Assigned)
On the JavaScript console, I see 2 error messages:

[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' 'unsafe-inline' data: whatsapp.com *.whatsapp.com *.whatsapp.net *.google-analytics.com *.facebook.com *.facebook.net *.twitter.com *.googleusercontent.com".

	eval (www.whatsapp.com:327:263)
	(anonymous function) (Script Element 12:327:263)
	(anonymous function) (Script Element 12:327:855)
	Global Code (Script Element 12:327:860)

[Error] TypeError: undefined is not an object (evaluating '__gCrWeb.translate.checkTranslateReady')
	Global Code (Script Element 13:1:87)


Comment 6 by droger@chromium.org, Apr 19 2017

translate_ios.js is a wrapper for the main translate script (components/translate/core/browser/resources/translate.js).

As far as I remember it was introduced to remove synchronous javascript calls (the native side code cannot synchronously call javascript on iOS).

The error message looks like the script could not run because of some content security policy (CSP).

This script should probably be bypassing the CSP, I'm pretty sure that how it is done on desktop. I don't know if this is possible on iOS though, given the system limitations.

Comment 7 by pkl@chromium.org, Apr 19 2017

This may be related to Issue 686364 which has javascript console messages related to Content Security Policy as well.
Cc: napper@chromium.org ramyasharma@chromium.org
@pkl@: re: c6 - is it possible to bypass the Content Security Policy as droger suggests?
Mergedinto: 686364
Status: Duplicate (was: Available)
Components: -UI>Browser>Translate UI>Browser>Language>Translate

Sign in to add a comment