java.lang.NoSuchFieldException: bookmarkdefaults_favicon_support

RESOLVED FIXED in Firefox 22

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kats, Assigned: mfinkle)

Tracking

unspecified
Firefox 22
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This exception shows up a lot on startup and in tbpl logs. If it is expected behaviour (from a cursory examination it looks expected if there is no distribution stuff) then can we silence the errors?

03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): [Path] Can't create favicon bookmarkdefaults_title_addons
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): java.lang.NoSuchFieldException: bookmarkdefaults_favicon_addons
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at java.lang.Class.getField(Class.java:787)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.getDefaultFaviconFromPath(BrowserProvider.java:1125)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.access$200(BrowserProvider.java:375)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper$2.run(BrowserProvider.java:1078)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at android.os.Handler.handleCallback(Handler.java:605)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at android.os.Handler.dispatchMessage(Handler.java:92)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at android.os.Looper.loop(Looper.java:137)
03-08 02:58:57.703 E/GeckoBrowserProvider( 3054): 	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): [Path] Can't create favicon bookmarkdefaults_title_support
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): java.lang.NoSuchFieldException: bookmarkdefaults_favicon_support
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at java.lang.Class.getField(Class.java:787)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.getDefaultFaviconFromPath(BrowserProvider.java:1125)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.access$200(BrowserProvider.java:375)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper$2.run(BrowserProvider.java:1078)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at android.os.Handler.handleCallback(Handler.java:605)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at android.os.Handler.dispatchMessage(Handler.java:92)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at android.os.Looper.loop(Looper.java:137)
03-08 02:58:57.726 E/GeckoBrowserProvider( 3054): 	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32)

Comment 1

5 years ago
These errors aren't coming from the distribution bookmarks code path. They're coming from the code we use to create the default bookmarks that we ship with fennec.

Maybe this could have been caused by bug 843234, although I feel like I've seen these errors around for longer than that.
No longer blocks: 836450
We log these exceptions when trying to create default bookmarks. We have two ways of grabbing the favicon for a bookmark. We try both methods for each default bookmark. One of the methods is always going to fail.

Maybe we should just log as a warning and not dump the exception info? That would mean changing code like this:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/db/BrowserProvider.java.in#1091

} catch (java.lang.NoSuchFieldException ex) {
  Log.e(LOGTAG, "Can't create bookmark " + name, ex);
}

To:

} catch (java.lang.NoSuchFieldException ex) {
  Log.w(LOGTAG, "Can't create bookmark " + name);
}

Comment 4

5 years ago
Do we even need a warning? It seems like we expect this code to throw, so it doesn't really seem that useful to log a warning.
(In reply to :Margaret Leibovic from comment #4)
> Do we even need a warning? It seems like we expect this code to throw, so it
> doesn't really seem that useful to log a warning.

Agreed. Kill it.
Created attachment 724179 [details] [diff] [review]
patch

Removed logging. We are silent now.
Assignee: nobody → mark.finkle
Attachment #724179 - Flags: review?(margaret.leibovic)

Comment 7

5 years ago
Comment on attachment 724179 [details] [diff] [review]
patch

Nit: Maybe put a comment saying why we don't care about that exception?
Attachment #724179 - Flags: review?(margaret.leibovic) → review+

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/5ab2ea763be2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.