- ago
The following is a pretty minor defect involving numerous repeated errors when the user's Schwab access token has expired.

Of course, all the user has to do is refresh the Schwab token through the data manager.

In any case, I am reporting the error incase you wanted to fix it. First up, there is the access token error. But, about 300ms later you get the infamous "object reference not set to an instance of an object". Then the retries repeat a lot, so this cycle happens many times within seconds. So, maybe it does one retry and gives up, I don't know.

CODE:
7/2/2026 16:20:36:258 Schwab Schwab Broker: Access Token Error. To resolve, log in to Schwab to obtain a new Refresh Token for this machine. Schwab API access is available for only 1 computer at a time. JsonReaderException Unexpected character encountered while parsing value: . Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) at WealthLab.Schwab.SchwabConnection.CheckAccessToken()

CODE:
7/2/2026 16:20:36:501 Schwab Error getting History (TE): Object reference not set to an instance of an object. NullReferenceException Object reference not set to an instance of an object. at WealthLab.Schwab.SchwabHistorical.RequestHistory(String symbol, HistoryScale scale, DateTime startDate, DateTime endDate, Int32 maxBars, Boolean includePartialBar, Boolean corrections, Nullable`1 lastRequestDate) at WealthLab.Schwab.SchwabHistorical.GetHistoryInternal(String symbol, HistoryScale scale, DateTime startDate, DateTime endDate, Int32 maxBars) at WealthLab.Data.DataProviderBase.GetHistory(String symbol, HistoryScale scale, DateTime startDate, DateTime endDate, Int32 maxBars, DataRequestOptions cb) at WealthLab.Data.HistoricalDataValet.CompleteAccessibleAggregator(String config, HistoryScale connection, DateTime template, DateTime instance2, Int32 ivk3, IHistoryProvider pol4, DataRequestOptions token5)
0
134
Solved
1 Replies

Reply

Bookmark

Sort
Cone8
- ago
#1
ok, thanks.
Bug aside, the best way to work with Schwab is to set a repeat 7-day alarm on the weekend to refresh the login.
0
Best Answer

Reply

Bookmark

Sort