New issue
Advanced search Search tips

Issue 730822 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Save Image throws Coca Error when the network is offline

Project Member Reported by jdhakshinamoor@chromium.org, Jun 7 2017

Issue description

App Version: 60.0.3112.20 beta 
iOS Version: 9.3.5
Device: iPad 2, iPhone 6 plus
URL: www.thehindu.com
 
 
Steps to reproduce:
  1. Launch app
  2. Navigate to the URL
  3. Turn the Wifi Off
  4. Long tap on Image and select Save Image from context menu.
 
Observed results:
Notice that Save Image throws an error 
 
Expected results:
 Save Image should not through Cocoa Error when network is offline
 
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: No, Safari: No
Bug reproducible on current stable build (App Version, iOS Version): Yes M59
Bug reproducible on the current beta channel build (App Version, iOS Version): Yes M60
 
Link to video:
https://drive.google.com/a/google.com/file/d/0BwSBFDzHIX-memxnV3JqQlBrRVU/view

 
Labels: -found-in-60 found-in-m60
Cc: mrefaat@chromium.org danyao@chromium.org
Components: UI>Browser>Downloads Mobile>WebView>Glue
Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)
Cc: -mrefaat@chromium.org -danyao@chromium.org kkhorimoto@chromium.org eugene...@chromium.org
Components: -Mobile>WebView>Glue -UI>Browser>Downloads UI>Browser>Core
Owner: ----
Status: Untriaged (was: Assigned)
Save Image feature us not part of ios web or download component. It is fully implemented in BVC. Marking untriaged as it needs an owner (maybe Kurt who works on context menu for the new architecture).
Cc: -kkhorimoto@chromium.org
Owner: khorimoto@chromium.org
Status: Assigned (was: Untriaged)
I couldn't find a better owner for this. Kurt, feel free to reassign if you know a more appropriate owner. 
Owner: kkhorimoto@chromium.org
Cc: sdefresne@chromium.org
Owner: gambard@chromium.org
It looks like Gauthier and Sylvain have worked on this feature in the past, based on git blame for |-saveImageAtURL:referrer:|.  Sending this their way.
Cc: mard...@chromium.org
+mardini@.
Indeed we do not handle the case where there is no network (or when there are no data). We could display the generic error "Cannot save image" or have something more specific.
Cc: pinkerton@chromium.org srahim@chromium.org
Owner: srahim@chromium.org
+ srahim

We should fix this error message and make it more informative if we know this is because there is no network or no data. 

Shimi: Looking for your input regarding the appropriate message to show in case we cannot save image due to no network or no data. Thanks.
Cc: gambard@chromium.org
By "no data," do you mean the user's mobile data usage has exceeded their limit? No network and no data feel like very different issues, have you considered a different error message for each error?

In the meantime, here are some rough drafts for iteration:

A) "Can't save image. Either there's no network connection, or you've reached your data limit." 

B) "Can't save image. No network or data is available." 
[I don't think this one is clear enough.]

C) "Can't save image. You're either offline or out of data." 
[This is concise, but the tone may sound a wee bit harsh. But may be best b/c the error dialog will be quite small.]

Thoughts? 
By "no data" I mean, in the code I receive 0 data. I think it would be the same if the user has no network or a bad network. I guess it would be the same if the user reached its data limit or disabled the data on its phone.
I think this alert should display a message explaining more or less the same thing as the message displayed when a page is loaded with no network (dino page). Maybe something like "Can't save image. No internet connection."?
Thanks, Shimi and Gauthier. I'd go for "Can't save image. No internet connection". 
Owner: gambard@chromium.org
Shimi, if it is ok with you I will implement "Can't save image. No internet connection."
Here is the implementation.
Simulator Screen Shot Jun 29, 2017, 1.12.13 PM.png
273 KB View Download
Project Member

Comment 15 by bugdroid1@chromium.org, Jun 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbf85c4795b79cbe3285167e3a0d18127ef747a0

commit bbf85c4795b79cbe3285167e3a0d18127ef747a0
Author: gambard <gambard@chromium.org>
Date: Thu Jun 29 15:57:00 2017

No internet connection error when saving image

When the user tries to save an image while having no internet connection
a Cocoa Error.
This CL adds a specific error message to handle this case.

BUG= 730822 

Change-Id: Id44ff57a4401a4d3d378be1d74d20598c3dd846d
Reviewed-on: https://chromium-review.googlesource.com/555170
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483374}
[modify] https://crrev.com/bbf85c4795b79cbe3285167e3a0d18127ef747a0/ios/chrome/app/strings/ios_strings.grd
[modify] https://crrev.com/bbf85c4795b79cbe3285167e3a0d18127ef747a0/ios/chrome/browser/ui/browser_view_controller.mm

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
verified the issue on the canary build 61.0.3148.0 canary tested in iPad(iOS 10).
Cannot Save Image No internet connection error is displayed on saving an image in no network, works fine.

Sign in to add a comment