Closed Bug 1157851 Opened 9 years ago Closed 8 years ago

Running python marionette deletes smart collection contents

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: njpark, Unassigned)

References

Details

(Whiteboard: fbimage)

Attachments

(1 file)

STR:

Run any python marionette on-device test.
After the test is completed, go to homescreen

Actual:
The smart collection icons (Social, Games, Music) are blank, and clicking them shows black screen
Upon restart, those smart collection icons are gone

See:
http://jenkins1.qa.scl3.mozilla.com/view/Graphics/job/flame-kk-319.mozilla-central.nightly.ui.graphics.smoke/333/artifact/screenshots
/test_cards_view_kill_apps_with_two_apps_flame_2+2015-04-23-03-17-07.png

It appears that combination of the lines in cleanup_data() methods deletes those collections: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L856
gwagner, bajaj told me that you might know what might be the reason behind this issue?
Flags: needinfo?(anygregor)
Whiteboard: fbimage
Anything interesting in logcat?
Flags: needinfo?(anygregor)
some odd things I see are 
in line 671:
I/Gecko   (  214): -*- SettingsRequestManager: Return message failed, Settings:Finalize:OK: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: resource://gre/modules/SettingsRequestManager.jsm :: returnMessage :: line 1044"  data: no]
in line 768: 
I/GeckoConsole( 2908): Could not read chrome manifest 'file:///system/b2g/chrome.manifest'.
I/Gecko:DumpUtils( 2908): FifoWatcher::OpenFifo unlink failed; errno=2.  Continuing despite error.
in line 949:
I/Gecko   ( 2908): 1429822334845	Marionette	DEBUG	conn2 client <- ({"from":"0","status":"no such element","sessionId":"{3841328e-daca-4e4e-b48e-bf8f8cd4fc1f}","error":{"message":"Unable to locate element: #homescreen[loading-state=false]","stacktrace":null,"status":"no such element"}})
And whole missing elements warning from line 1168 (probably just confirming what we're seeing)
The first nightly build showing this issue was http://jenkins1.qa.scl3.mozilla.com/job/flame-kk.mozilla-central.nightly.download/169/artifact/sources.xml, which was in April 21st, 5:40 PM.
Flags: needinfo?(anygregor)
Component: Marionette → Gaia::UI Tests
Product: Testing → Firefox OS
Moving this over to Gaia tests as this doesnt appear to be a marionette bug
This seems to be happening with this line in cleanup_data in gaia_test.py:         self.device.file_manager.remove('/data/local/storage/default')
(In reply to Martijn Wargers [:mwargers] (QA) from comment #6)
> This seems to be happening with this line in cleanup_data in gaia_test.py:  
> self.device.file_manager.remove('/data/local/storage/default')

A complete restart of the phone fixes the smart collections empty icons.
The contents of /data/local/storage/default/ are folders with .sqlite files for 1009+f+app+++verticalhome.gaiamobile.org, 1015+f+app+++keyboard.gaiamobile.org and 1031+f+app+++system.gaiamobile.org

If I do a full restart or a restart using Gaia UI test, I still get those folders and its contents.
The only difference I could see is that with a full restart, I see a "journals" folder inside "1009+f+app+++verticalhome.gaiamobile.org/1444454539veemrothilca.files/", which isn't there with a Gaia UI test b2g restart.

Dave Hunt, perhaps you could shed a light of what's going on here?
Flags: needinfo?(dave.hunt)
Hrm, actually, using the latest trunk build (where I can't see bug 1170175 either, yah!), I can't reproduce this anymore.

No-Jun, can you confirm?
Flags: needinfo?(dave.hunt) → needinfo?(npark)
(In reply to Martijn Wargers [:mwargers] (QA) from comment #7)
> (In reply to Martijn Wargers [:mwargers] (QA) from comment #6)
> > This seems to be happening with this line in cleanup_data in gaia_test.py:  
> > self.device.file_manager.remove('/data/local/storage/default')
> 
> A complete restart of the phone fixes the smart collections empty icons.
> The contents of /data/local/storage/default/ are folders with .sqlite files
> for 1009+f+app+++verticalhome.gaiamobile.org,
> 1015+f+app+++keyboard.gaiamobile.org and 1031+f+app+++system.gaiamobile.org
> 
> If I do a full restart or a restart using Gaia UI test, I still get those
> folders and its contents.
> The only difference I could see is that with a full restart, I see a
> "journals" folder inside
> "1009+f+app+++verticalhome.gaiamobile.org/1444454539veemrothilca.files/",
> which isn't there with a Gaia UI test b2g restart.
> 
> Dave Hunt, perhaps you could shed a light of what's going on here?

This is quite difficult to follow without clarifying what you mean by 'complete restart', 'full restart', and 'restart' :) I think we either just need to work out what additional items to delete, or what to avoid deleting when we run our tests.
Actually I still see this happening with the latest build consistently.  I got the latest build from pvt, synced to the tip of gaia, and ran python setup.py develop.

One another thing I just noticed, which might be relevant, is that when Flame is locked, the screen times out after 10 seconds or so regardless of the screen timeout value in settings.  But after running a marionette test, something is changed so the lockscreen does not turn itself off - it seems to be on indefinitely.  Minor issue, but I'll raise a bug to track it.  This used to not happen a week ago or so.
Flags: needinfo?(npark)
See Also: → 1171993
(In reply to No-Jun Park [:njpark] from comment #10)
> One another thing I just noticed, which might be relevant, is that when
> Flame is locked, the screen times out after 10 seconds or so regardless of
> the screen timeout value in settings.  But after running a marionette test,
> something is changed so the lockscreen does not turn itself off - it seems
> to be on indefinitely.  Minor issue, but I'll raise a bug to track it.  This
> used to not happen a week ago or so.

This behaviour was changed recently: https://github.com/mozilla-b2g/gaia/commit/c47b8c9f896294a780feff122804468446200ed8
Since FxOS is no longer being tested, closing it for now.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(anygregor)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: