Applications start in offline mode

Bug #586033 reported by Daniel Rodrigues
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Connection Manager
Fix Committed
High
Kalle Valo
Network Menu
Invalid
High
Unassigned
connman (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Firefox seems to fail communicating with connman and starts in offline mode. This doesn't happen w/ Midori or Chromium.
Is Firefox capable of getting network status of connman like it was w/ network-manager? Does conman support it? Or is this really a bug?

Connman 0.53+dfsg-0ubuntu0.10.04.1~ind1
indicator-network 0.0.0+r1-0lucid1
 Ubuntu 10.04 Lucid Lynx

Related branches

Daniel Rodrigues (danyr)
description: updated
Revision history for this message
Kalle Valo (kvalo) wrote :

First of all, connman does have compat code to support NM state. It's enabled with -c switch which should be enabled when starting with the init.d script. You can manually check the status with this command:

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state

The values are:

NM_STATE_UNKNOWN = 0
NM_STATE_ASLEEP = 1
NM_STATE_CONNECTING = 2
NM_STATE_CONNECTED = 3
NM_STATE_DISCONNECTED = 4

So you should see 3 as a reply when connected.

I tried to reproduce with connman 0.53+dfsg-0ubuntu0.10.04.1~ind1 and firefox 3.6.3+nobinonly-0ubuntu4. When I started firefox, it correctly detected the states between online and offline. But I noticed that firefox didn't notice state changes while it was running, I was had to restart it or manually change the mode from firefox. I don't have access to NetworkManager right now, so I don't know how firefox works with that one.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

This does not happen to me. Old bug?

Revision history for this message
Kalle Valo (kvalo) wrote :

People are complaining to me about applications being in offline state. I think there's a bug in connman, but this needs to be investigated.

Revision history for this message
Pete Goodall (pgoodall) wrote :

I came across this bug because Empathy thinks I'm offline when I'm using connman and indicator-network. When I run the dbus-send command above I get:

$ dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state
method return sender=:1.1 -> dest=:1.123 reply_serial=2
   uint32 4

I checked and connmand is running with the '-c' option.

$ ps aux | grep connman
root 1078 0.0 0.1 3816 2020 ? Ss 12:19 0:00 /usr/sbin/connmand -c
root 2531 0.0 0.0 2296 980 ? S 12:27 0:00 /sbin/dhclient -d -q -e BUSNAME=org.moblin.connman -e BUSINTF=org.moblin.connman.Task -e BUSPATH=/task/1 -pf /var/run/connman/dhclient.wlan0.pid -lf /var/run/connman/dhclient.wlan0.leases -cf /usr/lib/connman/scripts/dhclient.conf -sf /usr/lib/connman/scripts/dhclient-script wlan0 -n

$ cmcc state
State: online
OfflineMode: false
DefaultTechnology: wifi
ConnectedTechnologies: { wifi }
EnabledTechnologies: { ethernet wifi bluetooth }
AvailableTechnologies: { ethernet wifi bluetooth }
ActiveProfile: /profile/default
Profiles: { /profile/default }
Providers: { }
EnabledDebugs: { }
AvailableDebugs: { }
Technologies: { /org/moblin/connman/technology/ethernet /org/moblin/connman/technology/wifi /org/moblin/connman/technology/bluetooth }
Services: { /profile/default/wifi_00242bdd91cd_5562756e7475_managed_psk /profile/default/wifi_00242bdd91cd_5562756e74752d576573746d696e73746572_managed_psk /profile/default/wifi_00242bdd91cd_5562756e74752d4c616d62657468_managed_psk /profile/default/wifi_00242bdd91cd_5562756e74752d426174746572736561_managed_psk /profile/default/wifi_00242bdd91cd_415031_managed_psk /profile/default/wifi_00242bdd91cd_45412d574952454c455353_managed_ieee8021x /profile/default/wifi_00242bdd91cd_416c746974756465205468616d6573_managed_psk /profile/default/wifi_00242bdd91cd_56495349544f524e4554_managed_none /profile/default/wifi_00242bdd91cd_5769466920486f747a6f6e65_managed_none }

Revision history for this message
Daniel Rodrigues (danyr) wrote :

The same happens with Docky (dock app) and with its docklets. For example, GMail and Weather Docklets (both of them gather data from the web) don't work with Connman and Indicator Network (from Indicator-Network-daily PPA). Whenever I try to refresh them, they keep loading for a while and then fail to connect to Internet.
I've also experienced some occasional quirks in Empathy as described in the comments above.

Revision history for this message
Kalle Valo (kvalo) wrote :

Thank you for the comments. I renamed the title of this bug to reflect the case that this is not only firefox related, but happens with various applications.

Changed in connman:
status: New → Confirmed
Changed in indicator-network:
status: New → Confirmed
importance: Undecided → High
summary: - Firefox starts in offline mode
+ Applications start in offline mode
Revision history for this message
Daniel Rodrigues (danyr) wrote :

As of September 25, ~ 15 days to release, this's still happening. Any updates?

Revision history for this message
Kalle Valo (kvalo) wrote :

Sorry, I haven't been able to look at this in detail yet. This won't be fixed for maverick, but whenever this is fixed it will be available from the PPA.

Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

There's an odd thing that I would like to point out. I'm seeing this bug only today, however:
* I'm testing indicator-network since September;
* the last update to indicator-network I've done is dated 2010-10-01 (14 days ago);
* connman was never updated.

So I can't understand what's changed in my system since yesterday. If there's some useful information I can provide, please tell me where to look at.

Thanks,
Andrea

Kalle Valo (kvalo)
Changed in connman:
status: Confirmed → Triaged
importance: Undecided → Medium
importance: Medium → High
Kalle Valo (kvalo)
Changed in indicator-network:
status: Confirmed → Invalid
Kalle Valo (kvalo)
Changed in connman:
assignee: nobody → Kalle Valo (kvalo)
Kalle Valo (kvalo)
Changed in connman:
status: Triaged → In Progress
Revision history for this message
Daniel Rodrigues (danyr) wrote :

Now that I've checked, I can confirm that this is no longer happening to me while using Docky's docklets. Using both indicator-network and connman from Daily PPA.

Revision history for this message
Kalle Valo (kvalo) wrote :

I investigated this and I think I found multiple issues.

First of all, connman doesn't include the network manager interface in
/etc/dbus-1/system.d/connman.conf. This meant that applications were
not allowed to query network state through network-manager
compatibility interface. Unless network-manager still was installed
for some reason, then applications should be able to access connman's
compatibility interface.

Second problem was that connman didn't send StatusChanged signals when
the network state changed and that's why applications didn't notice
the state change. I sent a patch upstream:

http://lists.connman.net/pipermail/connman/2011-January/003315.html

Let's see if they take it or not.

With these two fixes the applications should work better now, at least
I was able to improvements with pidgin and firefox.

I noticed that thunderbird had problems detecting network, both with
connman and network-manager. I found bug #384749, so this is a common
problem in thunderbird (ie. not specific to connman) and decided not
to investigate any further at this time.

Unfortunately there are still problems with empathy. It does have
support for both network-manager and connman, but it detects on
compile time which one to enable. This is totally braindead, the check
should be runtime. And the network-manager part uses libnm and I
assume libnm doesn't work with connman for some reason. I filed bug
#704387
to handle the empathy problem.

I need still to investigate what to do with applications using libnm.
Unfortunately there are more applications than just empathy which use
libnm to check the network state.

Revision history for this message
Kalle Valo (kvalo) wrote :

I tested docky as well. It seems to break when connman's network-manager compatibility interface is enabled (and my fix to /etc/dbus-1/system.d/connman.conf is included). But if the compatibility interface is disabled, or disallowed by the dbus daemon, docky weather applet works fine. So docky also expects more than connman currently provides and breaks because of that.

Revision history for this message
Kalle Valo (kvalo) wrote : Re: [Bug 586033] Re: Applications start in offline mode

Daniel Rodrigues <email address hidden> writes:

> Now that I've checked, I can confirm that this is no longer happening to
> me while using Docky's docklets.

I think it works now because you don't have network-manager installed
anymore (latest connman daily builds conflict with network-manager).

If you run the dbus command below, I'm sure you will get an error:

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state

More info in comment #12.

--
Kalle Valo

Revision history for this message
Kalle Valo (kvalo) wrote :

I was debugging why empathy was still failing and found that a dbus method and signal, which libnm-glib requires, are still missing. I sent the patches upstream:

http://lists.connman.net/pipermail/connman/2011-January/003412.html

With these patches empathy now properly recognises network states. Hopefully upstream takes the patches and we get them to daily builds soon.

Revision history for this message
Kalle Valo (kvalo) wrote :

After some discussion we ended up having a separate nmcompat plugin which provides the network-manager compatibility interface. It's now in connman 0.68 and enabled in the daily builds.

Please report if there are still issues.

Changed in connman:
status: In Progress → Fix Committed
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

It seems to me that the issue is that connman doesn't expose the dbus introspection data for NM properties. At least I can't see them in d-feet.

Revision history for this message
Kalle Valo (kvalo) wrote :

It seems that the nmcompat plugin is not enabled in natty builds. Reopening.

Changed in connman:
status: Fix Committed → In Progress
Kalle Valo (kvalo)
Changed in connman (Ubuntu):
status: New → Triaged
importance: Undecided → High
Kalle Valo (kvalo)
Changed in connman:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package connman - 0.69-0ubuntu2

---------------
connman (0.69-0ubuntu2) natty; urgency=low

  * debian/rules: Remove unsupported configured switches --enable-dhclient
    and --enable-udev.
  * 11-dnsproxy-do-not-add-null-domains.patch: add to fix a crash with
    domain handling. (LP: #734339)
  * 04-wifi-add-a-disconnected-timer.patch: fix for a case if network is
    null. (LP: #733458)
  * debian/rules: enable nmcompat plugin so that applications can receive
    network state signals. (LP: #586033)
 -- Kalle Valo <email address hidden> Wed, 16 Mar 2011 10:53:33 +0200

Changed in connman (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.