From issues-return-97706-archive-asf-public=cust-asf.ponee.io@cordova.apache.org Tue Nov 13 16:38:09 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 840F318062B for ; Tue, 13 Nov 2018 16:38:08 +0100 (CET) Received: (qmail 36382 invoked by uid 500); 13 Nov 2018 15:38:07 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 36371 invoked by uid 99); 13 Nov 2018 15:38:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2018 15:38:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3CA2C18C29B for ; Tue, 13 Nov 2018 15:38:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.001 X-Spam-Level: X-Spam-Status: No, score=-109.001 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5W2S4cAXgdt2 for ; Tue, 13 Nov 2018 15:38:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 6292F62379 for ; Tue, 13 Nov 2018 15:38:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 56816E02E3 for ; Tue, 13 Nov 2018 15:38:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id F081C2525F for ; Tue, 13 Nov 2018 15:38:03 +0000 (UTC) Date: Tue, 13 Nov 2018 15:38:03 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16685379#comment-16685379 ] ASF GitHub Bot commented on CB-12035: ------------------------------------- janpio commented on issue #74: CB-12035 (android) Fix bug [cordova-plugin-network-information] connection info is not reliable on Android 6 URL: https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-438310593 Please leave an "Approve" review on the PR @terpro. In general someone has to come, understand and read through your PR @PieterVanPoyer, test and approve it, then merge. Later someone has to create a release of the plugin. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > [cordova-plugin-network-information] connection info is not reliable on Android 6 > --------------------------------------------------------------------------------- > > Key: CB-12035 > URL: https://issues.apache.org/jira/browse/CB-12035 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-plugin-network-information > Affects Versions: 1.3.0 > Environment: Samsung Galaxy Edge S6 / Android 6 > useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 Mobile Safari/537.36" > reproduced with: > cordova-plugin-network-information@1.3.0 (latest) > cordova-plugin-network-information@1.2.0 > Reporter: jakub-g > Priority: Major > Labels: android > > I've noticed that information exposed by the plugin is not reliable. It happens often that I'm connected to the internet via WiFi, and the plugin says that there's no connection. > It's not easy to reproduce it on-demand, but I reproduced it many times recently. It happens most often when in the morning, I open the Cordova app that was running in background throughout the night. > Then, when I connect to Chrome Dev Tools, I can do a repl session like this: > {code} > > navigator.connection.type > "none" > > window.fetch('http://www.example.org').then(function(res) {console.log(res.status)}) > Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} > 200 > Fetch complete: GET "http://www.example.org/".(anonymous function) > > navigator.connection.type > "none" > {code} > So, the plugin thinks I'm offline, yet any HTTP calls done within the app without checking if I'm offline or online, are successful (either from the app or devtools). > When I disable WiFi and reenable it, after a few seconds the plugin updates its state and then it tells that connection type is "wifi". > There are several possibilities here: > - either system (or device driver) gives us incorrect information, or > - cordova plugin is caching data and/or not listening properly to all the events and/or incorrectly processing it > and most probably the issue manifests itself when the device is asleep for many hours (but I'm not sure about this). > Note that I also noticed another issue, that sometimes the Chrome network stack thinks I'm offline (when I do an HTTP call, it fails immediately and I see network errors in devtools console) - and then I restart the Cordova app, and everything's fine, all HTTP calls are ok - but this is unrelated to this ticket, and perhaps a bug in Chrome. > This ticket seems to be most likely a bug in the plugin, because as I said before, doing HTTP call succeeds despite the plugin telling me that I'm offline. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org