Bug #502

avatar

Twitter: Error converting value "100+" to type 'System.Nullable`1[System.Int32]'

Added by Carlos Martín Nieto 5173 days ago. Updated 5087 days ago.

Status:Closed Start:09/23/2010
Priority:Urgent Due date:
Assigned to:avatarMirco Bauer % Done:

100%

Category:Engine Twitter
Target version:0.8.9
Complexity:

Found in Version:

Votes: 1 (View)

Description

Twitter have broken something again. Starting a local instance doesn't show this error.

2010-09-22 16:25:29,406 [TwitterProtocolManager friends timeline listener] ERROR Smuxi.Engine.TwitterProtocolManager - UpdateFriendsTimelineThread(): Exception
Newtonsoft.Json.JsonSerializationException: Error converting value "100+" to type 'System.Nullable`1[System.Int32]'. ---> System.Exception: Could not cast or convert from System.String to System.Nullable`1[System.Int32].
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable (System.Object value, System.Type initialType, System.Type targetType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast (System.Object initialValue, System.Globalization.CultureInfo culture, System.Type targetType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (System.Object value, System.Type targetType) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (System.Object value, System.Type targetType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueProperty (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonProperty property, System.Object target, Boolean gottenCurrentValue, System.Object currentValue) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, System.String id) [0x00000] in <filename unknown>:0

smuxi.log - Log of Twitter fail (166.2 KB) Carlos Martín Nieto, 09/23/2010 11:58 AM

Associated revisions

Revision 9390af7d3f3b6e8d318816f608432b98973ca67c
Added by Mirco Bauer 5087 days ago

Updated lib/Twitterizer which fixes the 100+ parser issue. (closes: #502)

History

Updated by Carlos Martín Nieto 5173 days ago

avatar

I got this error as well on a local engine with debugging enabled, here is the whole log (interesting bit at the end)

Updated by Mirco Bauer 5168 days ago

avatar
  • Category set to Engine Twitter
  • Target version set to 0.8.9

Updated by Mirco Bauer 5167 days ago

avatar
  • Assigned to set to Mirco Bauer
  • Priority changed from Normal to Urgent
19:41:35 <jonp_> meebey: and now i'm unable to login to twitter at all
19:41:40 <jonp_> every attempt results in a failure
19:44:25 <jonp_> meebey: looks like Twitter is returning the literal value "100+", which isn't parsable as an int
2010-09-29 13:42:01,514 [-856324336] ERROR Smuxi.Engine.TwitterProtocolManager - Connect(): Failed to fetch friends from Twitter. Reason: 
Newtonsoft.Json.JsonSerializationException: Error converting value "100+" to type 'System.Nullable`1[System.Int32]'. ---> System.Exception: Could not cast or convert from System.String to System.Nullable`1[System.Int32].
  at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable (System.Object value, System.Type initialType, System.Type targetType) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast (System.Object initialValue, System.Globalization.CultureInfo culture, System.Type targetType) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (System.Object value, System.Type targetType) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (System.Object value, System.Type targetType) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueProperty (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonProperty property, System.Object target, Boolean gottenCurrentValue, System.Object currentValue) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, System.String id) [0x00000] in <filename unknown>:0 
2010-09-29 13:42:01,518 [Main] DEBUG TRACE - [smuxi-frontend-gnome.exe] ChatView.AddMessage(msg = -!- Failed to fetch friends from Twitter. Reason: Error converting value "100+" to type 'System.Nullable`1[System.Int32]'.)
2010-09-29 13:42:01,518 [Main] DEBUG TRACE - [smuxi-frontend-gnome.exe] MessageTextView.AddMessage(msg = -!- Failed to fetch friends from Twitter. Reason: Error converting value "100+" to type 'System.Nullable`1[System.Int32]'., addLinebreak = True)
2010-09-29 13:42:01,518 [Main] DEBUG TRACE - [smuxi-frontend-gnome.exe] ChatView.OnMessageTextViewMessageAdded(sender = Smuxi.Frontend.Gnome.MessageTextView, e = Smuxi.Frontend.Gnome.MessageTextViewMessageAddedEventArgs)

Updated by Mirco Bauer 5087 days ago

avatar

This issue is tracked in Twitterizer here: http://pm.twitterizer.net/issues/36
And the fix here: http://pm.twitterizer.net/projects/twitterizer/repository/revisions/387/diff/trunk/Twitterizer2/Methods/Tweets/TwitterStatus.cs

The fix needs to be backported to Smuxi's twitterizer.git repository.

Updated by Mirco Bauer 5087 days ago

avatar
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF