elixir-inspector / ua_inspector

User agent parser library
Apache License 2.0
122 stars 23 forks source link

Getting errors when downloading database #6

Closed rodrigues closed 8 years ago

rodrigues commented 8 years ago

Files seems to be downloaded correctly in the end, but many errors are logged on console when running the database download.

Tried with latest version on hex, also with github master.

> iex -v
Erlang/OTP 19 [erts-8.0.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

IEx 1.3.1
This command will overwrite any existing files!
Really download? [Yn]
.. downloading: bots.yml
.. downloading: browser_engines.yml
.. downloading: clients.feed_readers.yml

18:13:27.450 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}
   Pos:         7
   Value:       0
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31473>, :tls_connection, :undefined},
  #PID<0.803.0>}, {:essl, []}, 1, :keep_alive, true}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :handle_empty_queue, 4,
    [file: 'httpc_handler.erl', line: 1368]},
   {:httpc_handler, :handle_info, 2, [file: 'httpc_handler.erl', line: 471]},
   {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 601]},
   {:gen_server, :handle_msg, 5, [file: 'gen_server.erl', line: 667]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
   T: :error
   E: :badarg

18:13:27.451 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}
   Pos:         9
   Value:       true
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31473>, :tls_connection, :undefined},
  #PID<0.803.0>}, {:essl, []}, 1, :keep_alive, false}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :maybe_make_session_available, 2,
    [file: 'httpc_handler.erl', line: 1516]},
   {:httpc_handler, :answer_request, 3,
    [file: 'httpc_handler.erl', line: 1507]},
   {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]},
   {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]},
   {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]}}
   T: :error
   E: :badarg

18:13:27.466 [error] GenServer #PID<0.802.0> terminating
** (stop) {:failed_updating_session, [profile: :httpc_mix, session_id: {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}, pos: 9, value: true, etype: :error, error: :badarg, stacktrace: [{:ets, :update_element, [:httpc_mix__session_db, {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}, {9, true}], []}, {:httpc_manager, :update_session, 4, [file: 'httpc_manager.erl', line: 210]}, {:httpc_handler, :update_session, 4, [file: 'httpc_handler.erl', line: 1887]}, {:httpc_handler, :maybe_make_session_available, 2, [file: 'httpc_handler.erl', line: 1516]}, {:httpc_handler, :answer_request, 3, [file: 'httpc_handler.erl', line: 1507]}, {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]}, {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]}, {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]]}
    (inets) httpc_handler.erl:1911: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1516: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1507: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:759: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.31473>, :tls_connection, :undefined}, #PID<0.803.0>}, "HTTP/1.1 200 OK\r\nContent-Security-Policy: default-src 'none'; style-src 'unsafe-inline'\r\nStrict-Transport-Security: max-age=31536000\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: deny\r\nX-XSS-Protection: 1; mode=block\r\nETag: \"8cbe94746163548f7ca32fd7ccb440419ff7ab60\"\r\nContent-Type: text/plain; charset=utf-8\r\nCache-Control: max-age=300\r\nX-Geo-Block-List:\r\nX-GitHub-Request-Id: 17EB2B2C:22365:3647BE:5787BA27\r\nContent-Length: 511\r\nAccept-Ranges: bytes\r\nDate: Thu, 14 Jul 2016 16:13:27 GMT\r\nVia: 1.1 varnish\r\nConnection: keep-alive\r\nX-Served-By: cache-ams4123-AMS\r\nX-Cache: MISS\r\nX-Cache-Hits: 0\r\nVary: Authorization,Accept-Encoding\r\nAccess-Control-Allow-Origin: *\r\nX-Fastly-Request-ID: 0959eb46ea5ff4ce44768c46ca14d206a9776854\r\nExpires: Thu, 14 Jul 2016 16:18:27 GMT\r\nSource-Age: 0\r\n\r\n###############\n# Device Detector - The Universal Device Detection library for parsing User Agents\n#\n# @link http://piwik.org\n# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later\n###############\n\n- regex: 'NetFront'\n  name: 'NetFront'\n\n- regex: 'Edge'\n  name: 'Edge'\n\n- regex: 'Trident'\n  name: 'Trident'\n\n- regex: 'Blink'\n  name: 'Blink'\n\n- regex: '(?:Apple)?WebKit'\n  name: 'WebKit'\n\n- regex: 'Presto'\n  name: 'Presto'\n\n- regex: '(?<!like )Gecko'\n  name: 'Gecko'\n\n- regex: 'KHTML'\n  name: 'KHTML'"}
State: {:state, {:request, #Reference<0.0.3.5660>, #PID<0.70.0>, 0, :https, {'raw.githubusercontent.com', 443}, '/piwik/device-detector/master/regexes/client/browser_engine.yml', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'raw.githubusercontent.com', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.3.1', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://raw.githubusercontent.com/piwik/device-detector/master/regexes/client/browser_engine.yml', [], :none, [], 1468512807251, :undefined, :undefined, false}, {:session, {{'raw.githubusercontent.com', 443}, #PID<0.802.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.31473>, :tls_connection, :undefined}, #PID<0.803.0>}, {:essl, []}, 1, :keep_alive, false}, :undefined, :undefined, :undefined, {:httpc_response, :parse, [:nolimit, true]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
.. downloading: clients.mobile_apps.yml

18:13:27.598 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}
   Pos:         7
   Value:       0
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31506>, :tls_connection, :undefined},
  #PID<0.807.0>}, {:essl, []}, 1, :keep_alive, true}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :handle_empty_queue, 4,
    [file: 'httpc_handler.erl', line: 1368]},
   {:httpc_handler, :handle_info, 2, [file: 'httpc_handler.erl', line: 471]},
   {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 601]},
   {:gen_server, :handle_msg, 5, [file: 'gen_server.erl', line: 667]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
   T: :error
   E: :badarg

18:13:27.600 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}
   Pos:         9
   Value:       true
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31506>, :tls_connection, :undefined},
  #PID<0.807.0>}, {:essl, []}, 1, :keep_alive, false}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :maybe_make_session_available, 2,
    [file: 'httpc_handler.erl', line: 1516]},
   {:httpc_handler, :answer_request, 3,
    [file: 'httpc_handler.erl', line: 1507]},
   {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]},
   {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]},
   {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]}}
   T: :error
   E: :badarg

18:13:27.603 [error] GenServer #PID<0.806.0> terminating
** (stop) {:failed_updating_session, [profile: :httpc_mix, session_id: {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}, pos: 9, value: true, etype: :error, error: :badarg, stacktrace: [{:ets, :update_element, [:httpc_mix__session_db, {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}, {9, true}], []}, {:httpc_manager, :update_session, 4, [file: 'httpc_manager.erl', line: 210]}, {:httpc_handler, :update_session, 4, [file: 'httpc_handler.erl', line: 1887]}, {:httpc_handler, :maybe_make_session_available, 2, [file: 'httpc_handler.erl', line: 1516]}, {:httpc_handler, :answer_request, 3, [file: 'httpc_handler.erl', line: 1507]}, {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]}, {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]}, {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]]}
    (inets) httpc_handler.erl:1911: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1516: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1507: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:759: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.31506>, :tls_connection, :undefined}, #PID<0.807.0>}, " '$1'\n  url: 'http://readkitapp.com/'\n  type: 'Feed Reader App'\n\n- regex: 'Reeder(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Reeder'\n  version: '$1'\n  url: 'http://reederapp.com/'\n  type: 'Feed Reader App'\n\n- regex: 'RSSBandit(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'RSS Bandit'\n  version: '$1'\n  url: 'http://www.rssbandit.org)'\n  type: 'Feed Reader'\n\n- regex: 'RSS Junkie(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'RSS Junkie'\n  version: '$1'\n  url: 'https://play.google.com/store/apps/details?id=com.bitpowder.rssjunkie'\n  type: 'Feed Reader App'\n\n- regex: 'RSSOwl(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'RSSOwl'\n  version: '$1'\n  url: 'http://www.rssowl.org/'\n  type: 'Feed Reader'\n\n- regex: 'Stringer'\n  name: 'Stringer'\n  version: ''\n  url: 'https://github.com/swanson/stringer'\n  type: 'Feed Reader'\n"}
State: {:state, {:request, #Reference<0.0.3.5693>, #PID<0.70.0>, 0, :https, {'raw.githubusercontent.com', 443}, '/piwik/device-detector/master/regexes/client/feed_readers.yml', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'raw.githubusercontent.com', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.3.1', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://raw.githubusercontent.com/piwik/device-detector/master/regexes/client/feed_readers.yml', [], :none, [], 1468512807420, :undefined, :undefined, false}, {:session, {{'raw.githubusercontent.com', 443}, #PID<0.806.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.31506>, :tls_connection, :undefined}, #PID<0.807.0>}, {:essl, []}, 1, :keep_alive, false}, {'HTTP/1.1', 200, 'OK'}, {:http_response_h, 'max-age=300', 'keep-alive', 'Thu, 14 Jul 2016 16:13:27 GMT', :undefined, :undefined, :undefined, :undefined, '1.1 varnish', :undefined, 'bytes', :undefined, '"cf90ff53268391e5c1aa0e286841d25db690b084"', :undefined, :undefined, :undefined, :undefined, 'Authorization,Accept-Encoding', :undefined, :undefined, :undefined, :undefined, '2735', :undefined, :undefined, :undefined, 'text/plain; charset=utf-8', 'Thu, 14 Jul 2016 16:18:27 GMT', :undefined, [{'content-security-policy', 'default-src \'none\'; style-src \'unsafe-inline\''}, {'strict-transport-security', 'max-age=31536000'}, {'x-content-type-options', 'nosniff'}, {'x-frame-options', 'deny'}, {'x-xss-protection', '1; mode=block'}, {'x-geo-block-list', []}, {'x-github-request-id', '17EB2B30:6304:39D031:5787BA27'}, {'x-served-by', 'cache-ams4137-AMS'}, {'x-cache', 'MISS'}, {'x-cache-hits', '0'}, {'access-control-allow-origin', '*'}, {'x-fastly-request-id', '011f883e5aa42ae42fe0db598d075622d46e669f'}, {'source-age', '0'}]}, :undefined, {:httpc_response, :whole_body, ["###############\n# Device Detector - The Universal Device Detection library for parsing User Agents\n#\n# @link http://piwik.org\n# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later\n###############\n\n- regex: 'Akregator(?:/(\\d+[\\.\\d]+))?'\n  name: 'Akregator'\n  version: '$1'\n  url: 'http://userbase.kde.org/Akregator'\n  type: 'Feed Reader'\n\n- regex: 'Apple-PubSub(?:/(\\d+[\\.\\d]+))?'\n  name: 'Apple PubSub'\n  version: '$1'\n  url: 'https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pubsub.1.html'\n  type: 'Feed Reader'\n\n- regex: 'FeedDemon(?:/(\\d+[\\.\\d]+))?'\n  name: 'FeedDemon'\n  version: '$1'\n  url: 'http://www.feeddemon.com/'\n  type: 'Feed Reader'\n\n- regex: 'Feeddler(?:RSS|PRO)(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Feeddler RSS Reader'\n  version: '$1'\n  url: 'http://www.chebinliu.com/projects/iphone/feeddler-rss-reader/'\n  type: 'Feed Reader App'\n\n- regex: 'JetBrains Omea Reader(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'JetBrains Omea Reader'\n  version: '$1'\n  url: 'http://www.jetbrains.com/omea/reader/'\n  type: 'Feed Reader'\n\n- regex: 'Liferea(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Liferea'\n  version: '$1'\n  url: 'http://liferea.sf.net/'\n  type: 'Feed Reader'\n\n- regex: 'NetNewsWire(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'NetNewsWire'\n  version: '$1'\n  url: 'http://netnewswireapp.com/'\n  type: 'Feed Reader'\n\n- regex: 'NewsBlur (?:iPhone|iPad) App(?: v(\\d+[\\.\\d]+))?'\n  name: 'NewsBlur Mobile App'\n  version: '$1'\n  url: 'http://www.newsblur.com'\n  type: 'Feed Reader App'\n\n- regex: 'NewsBlur(?:/(\\d+[\\.\\d]+))'\n  name: 'NewsBlur'\n  version: '$1'\n  url: 'http://www.newsblur.com'\n  type: 'Feed Reader'\n\n- regex: 'newsbeuter(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Newsbeuter'\n  version: '$1'\n  url: 'http://www.newsbeuter.org/'\n  type: 'Feed Reader'\n\n- regex: 'Pulp(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Pulp'\n  version: '$1'\n  url: 'http://www.acrylicapps.com/pulp/'\n  type: 'Feed Reader App'\n\n- regex: 'ReadKit(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'ReadKit'\n  version:", 2735]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
.. downloading: clients.mediaplayers.yml
.. downloading: clients.pim.yml
.. downloading: clients.browsers.yml

18:13:28.068 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}
   Pos:         7
   Value:       0
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31881>, :tls_connection, :undefined},
  #PID<0.819.0>}, {:essl, []}, 1, :keep_alive, true}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :handle_empty_queue, 4,
    [file: 'httpc_handler.erl', line: 1368]},
   {:httpc_handler, :handle_info, 2, [file: 'httpc_handler.erl', line: 471]},
   {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 601]},
   {:gen_server, :handle_msg, 5, [file: 'gen_server.erl', line: 667]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
   T: :error
   E: :badarg

18:13:28.069 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}
   Pos:         9
   Value:       true
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31881>, :tls_connection, :undefined},
  #PID<0.819.0>}, {:essl, []}, 1, :keep_alive, false}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :maybe_make_session_available, 2,
    [file: 'httpc_handler.erl', line: 1516]},
   {:httpc_handler, :answer_request, 3,
    [file: 'httpc_handler.erl', line: 1507]},
   {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]},
   {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]},
   {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]}}
   T: :error
   E: :badarg

18:13:28.072 [error] GenServer #PID<0.818.0> terminating
** (stop) {:failed_updating_session, [profile: :httpc_mix, session_id: {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}, pos: 9, value: true, etype: :error, error: :badarg, stacktrace: [{:ets, :update_element, [:httpc_mix__session_db, {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}, {9, true}], []}, {:httpc_manager, :update_session, 4, [file: 'httpc_manager.erl', line: 210]}, {:httpc_handler, :update_session, 4, [file: 'httpc_handler.erl', line: 1887]}, {:httpc_handler, :maybe_make_session_available, 2, [file: 'httpc_handler.erl', line: 1516]}, {:httpc_handler, :answer_request, 3, [file: 'httpc_handler.erl', line: 1507]}, {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]}, {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]}, {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]]}
    (inets) httpc_handler.erl:1911: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1516: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1507: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:759: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.31881>, :tls_connection, :undefined}, #PID<0.819.0>}, "HTTP/1.1 200 OK\r\nContent-Security-Policy: default-src 'none'; style-src 'unsafe-inline'\r\nStrict-Transport-Security: max-age=31536000\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: deny\r\nX-XSS-Protection: 1; mode=block\r\nETag: \"8ce5fdfbd9f04c2ae9f68bc5aea40887dc51d5c2\"\r\nContent-Type: text/plain; charset=utf-8\r\nCache-Control: max-age=300\r\nX-Geo-Block-List:\r\nX-GitHub-Request-Id: 17EB2B1B:5847:57EC6F:5787BA27\r\nContent-Length: 962\r\nAccept-Ranges: bytes\r\nDate: Thu, 14 Jul 2016 16:13:28 GMT\r\nVia: 1.1 varnish\r\nConnection: keep-alive\r\nX-Served-By: cache-ams4450-AMS\r\nX-Cache: MISS\r\nX-Cache-Hits: 0\r\nVary: Authorization,Accept-Encoding\r\nAccess-Control-Allow-Origin: *\r\nX-Fastly-Request-ID: 07f54093eb1b758a2fd905ec705270c3b484a813\r\nExpires: Thu, 14 Jul 2016 16:18:28 GMT\r\nSource-Age: 0\r\n\r\n###############\n# Device Detector - The Universal Device Detection library for parsing User Agents\n#\n# @link http://piwik.org\n# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later\n###############\n\n- regex: 'Outlook-Express(?:/(\\d+[\\.\\d]+))?'\n  name: 'Outlook Express'\n  version: '$1'\n\n- regex: 'Microsoft Outlook(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Microsoft Outlook'\n  version: '$1'\n\n- regex: '(?:Thunderbird|Icedove|Shredder)(?:/(\\d+[\\.\\d]+))?'\n  name: 'Thunderbird'\n  version: '$1'\n\n- regex: 'Airmail(?: (\\d+[\\.\\d]+))?'\n  name: 'Airmail'\n  version: '$1'\n\n- regex: 'Lotus-Notes(?:/(\\d+[\\.\\d]+))?'\n  name: 'Lotus Notes'\n  version: '$1'\n\n- regex: 'Barca(?:Pro)?(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Barca'\n  version: '$1'\n\n- regex: 'Postbox(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'Postbox'\n  version: '$1'\n\n- regex: 'MailBar(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'MailBar'\n  version: '$1'\n\n- regex: 'The Bat!(?: Voyager)?(?:[/ ](\\d+[\\.\\d]+))?'\n  name: 'The Bat!'\n  version: '$1'"}
State: {:state, {:request, #Reference<0.0.1.2360>, #PID<0.70.0>, 0, :https, {'raw.githubusercontent.com', 443}, '/piwik/device-detector/master/regexes/client/pim.yml', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'raw.githubusercontent.com', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.3.1', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://raw.githubusercontent.com/piwik/device-detector/master/regexes/client/pim.yml', [], :none, [], 1468512807923, :undefined, :undefined, false}, {:session, {{'raw.githubusercontent.com', 443}, #PID<0.818.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.31881>, :tls_connection, :undefined}, #PID<0.819.0>}, {:essl, []}, 1, :keep_alive, false}, :undefined, :undefined, :undefined, {:httpc_response, :parse, [:nolimit, true]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
.. downloading: clients.libraries.yml
.. downloading: devices.televisions.yml
.. downloading: devices.consoles.yml
.. downloading: devices.car_browsers.yml
.. downloading: devices.cameras.yml
.. downloading: devices.portable_media_player.yml
.. downloading: devices.mobiles.yml

18:13:29.247 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}
   Pos:         7
   Value:       0
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31895>, :tls_connection, :undefined},
  #PID<0.847.0>}, {:essl, []}, 1, :keep_alive, true}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :handle_empty_queue, 4,
    [file: 'httpc_handler.erl', line: 1368]},
   {:httpc_handler, :handle_info, 2, [file: 'httpc_handler.erl', line: 471]},
   {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 601]},
   {:gen_server, :handle_msg, 5, [file: 'gen_server.erl', line: 667]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
   T: :error
   E: :badarg

18:13:29.248 [error] Failed updating session:
   ProfileName: :httpc_mix
   SessionId:   {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}
   Pos:         9
   Value:       true
when
   Session (db) info: :undefined
   Session (db):      {:session, {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}, false, :https,
 {:sslsocket, {:gen_tcp, #Port<0.31895>, :tls_connection, :undefined},
  #PID<0.847.0>}, {:essl, []}, 1, :keep_alive, false}
   Session (record):  {:EXIT,
 {:badarg,
  [{:ets, :lookup,
    [:httpc_mix__session_db,
     {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}], []},
   {:httpc_manager, :lookup_session, 2, [file: 'httpc_manager.erl', line: 189]},
   {:httpc_handler, :update_session, 4,
    [file: 'httpc_handler.erl', line: 1909]},
   {:httpc_handler, :maybe_make_session_available, 2,
    [file: 'httpc_handler.erl', line: 1516]},
   {:httpc_handler, :answer_request, 3,
    [file: 'httpc_handler.erl', line: 1507]},
   {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]},
   {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]},
   {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]}}
   T: :error
   E: :badarg

18:13:29.250 [error] GenServer #PID<0.846.0> terminating
** (stop) {:failed_updating_session, [profile: :httpc_mix, session_id: {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}, pos: 9, value: true, etype: :error, error: :badarg, stacktrace: [{:ets, :update_element, [:httpc_mix__session_db, {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}, {9, true}], []}, {:httpc_manager, :update_session, 4, [file: 'httpc_manager.erl', line: 210]}, {:httpc_handler, :update_session, 4, [file: 'httpc_handler.erl', line: 1887]}, {:httpc_handler, :maybe_make_session_available, 2, [file: 'httpc_handler.erl', line: 1516]}, {:httpc_handler, :answer_request, 3, [file: 'httpc_handler.erl', line: 1507]}, {:httpc_handler, :terminate, 2, [file: 'httpc_handler.erl', line: 759]}, {:gen_server, :try_terminate, 3, [file: 'gen_server.erl', line: 629]}, {:gen_server, :terminate, 7, [file: 'gen_server.erl', line: 795]}]]}
    (inets) httpc_handler.erl:1911: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1516: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1507: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:759: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.31895>, :tls_connection, :undefined}, #PID<0.847.0>}, "HTTP/1.1 200 OK\r\nContent-Security-Policy: default-src 'none'; style-src 'unsafe-inline'\r\nStrict-Transport-Security: max-age=31536000\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: deny\r\nX-XSS-Protection: 1; mode=block\r\nETag: \"7d59a2f1b1561012c25a0d84713b0cb19efa3388\"\r\nContent-Type: text/plain; charset=utf-8\r\nCache-Control: max-age=300\r\nX-Geo-Block-List:\r\nX-GitHub-Request-Id: 17EB2B21:39E1:38750F:5787BA28\r\nContent-Length: 1547\r\nAccept-Ranges: bytes\r\nDate: Thu, 14 Jul 2016 16:13:29 GMT\r\nVia: 1.1 varnish\r\nConnection: keep-alive\r\nX-Served-By: cache-ams4441-AMS\r\nX-Cache: MISS\r\nX-Cache-Hits: 0\r\nVary: Authorization,Accept-Encoding\r\nAccess-Control-Allow-Origin: *\r\nX-Fastly-Request-ID: 2eb5963c603f3ba374f0eadf667a9a4caae55e37\r\nExpires: Thu, 14 Jul 2016 16:18:29 GMT\r\nSource-Age: 0\r\n\r\n###############\n# Device Detector - The Universal Device Detection library for parsing User Agents\n#\n# @link http://piwik.org\n# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later\n###############\n\nApple:\n  regex: '(?:Apple-)?iPod'\n  device: 'portable media player'\n  models:\n    - regex: '(?:Apple-)?iPod1[C,]1'\n      model: 'iPod Touch 1G'\n    - regex: '(?:Apple-)?iPod2[C,]1'\n      model: 'iPod Touch 2G'\n    - regex: '(?:Apple-)?iPod3[C,]1'\n      model: 'iPod Touch 3'\n    - regex: '(?:Apple-)?iPod4[C,]1'\n      model: 'iPod Touch 4'\n    - regex: '(?:Apple-)?iPod5[C,]1'\n      model: 'iPod Touch 5'\n    - regex: '(?:Apple-)?iPod1[C,]1'\n      model: 'iPod Touch'\n    - regex: '(?:Apple-)?iPod1[C,]1'\n      model: 'iPod Touch'\n    - regex: '(?:Apple-)?iPod'\n      model: 'iPod Touch'\n\nCowon:\n  regex: 'COWON ([^;/]+) Build'\n  device: 'portable media player'\n  model: '$1'\n\nMicrosoft:\n  regex: 'Microsoft ZuneHD'\n  device: 'portable media player'\n  model: 'Zune HD'\n\nPanasonic:\n  device: 'portable media player'\n  regex: '(SV-MV100)'\n  model: '$1'\n\nSamsung:\n  regex: 'YP-(G[SIPB]?1|G[57]0|GB70D)'\n  device: 'portable media player'\n  models:\n    - regex: 'YP-G[B]?1'\n      model: 'Galaxy Player 4.0'\n    - regex: 'YP-G70'\n      model: 'Galaxy Player 5.0'\n    - regex: 'YP-GS1'\n      model: 'Galaxy Player 3.6'\n    - regex: 'YP-GI1'\n      model: 'Galaxy Player 4.2'\n    - regex: 'YP-GP1'\n      model: 'Galaxy Player 5.8 '\n    - regex: 'YP-G50'\n      model: 'Galaxy Player 50'\n    - regex: 'YP-GB70D'\n      model: 'Galaxy Player 70 Plus'\n"}
State: {:state, {:request, #Reference<0.0.1.2524>, #PID<0.70.0>, 0, :https, {'raw.githubusercontent.com', 443}, '/piwik/device-detector/master/regexes/device/portable_media_player.yml', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'raw.githubusercontent.com', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.3.1', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://raw.githubusercontent.com/piwik/device-detector/master/regexes/device/portable_media_player.yml', [], :none, [], 1468512809098, :undefined, :undefined, false}, {:session, {{'raw.githubusercontent.com', 443}, #PID<0.846.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.31895>, :tls_connection, :undefined}, #PID<0.847.0>}, {:essl, []}, 1, :keep_alive, false}, :undefined, :undefined, :undefined, {:httpc_response, :parse, [:nolimit, true]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
.. downloading: oss.yml
.. downloading: vendorfragments.yml
Download complete!
mneudert commented 8 years ago

Hehe, I know of these messages but they are actually not a "problem" per se.

If you look around some travis builds of various projects (phoenixframework, poison, earmark, ... -> google search) you can see them appear all over the place once HTTPS is involved. As far as I can tell mostly in combination with Mix.Utils.read_path/1,2. Even mix hex.local --force sometimes triggers these messages.

Once the file is returned mix calls :inets.stop(:httpc, :mix) and that seems to trigger a race condition with the internal SSL session update. While that seems like something is wrong nothing happened but a failed update to a no longer existing session. The internal pattern match on { :ok, file_contents } in the download module should catch any real error if one occurs.

I will look into a way around this by handling the :httpc connection without mix. Until then you should be fine ignoring these messages as long as you see the "Download complete!" at the end.

rodrigues commented 8 years ago

Got it, thanks @mneudert!

In another machine, I didn't have any of these alerts btw. 👍

mneudert commented 8 years ago

As some sort of fyi:

I have switched the method to download the database files from mix to hackney. This should work as previously (except you have to configure any proxies yourself) while preventing any log entries you encountered.