Bug 1290990

Summary: ValueError: Expecting object: line 1 column 6636469 (char 6636468)
Product: [Fedora] Fedora Reporter: Peter H. Jones <jones.peter.busi>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jones.peter.busi, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-11 12:04:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
failure in verbose mode none

Description Peter H. Jones 2015-12-12 14:31:13 UTC
Created attachment 1105043 [details]
failure in verbose mode

Can't download Google updates.

First try:
"dnf download google-chrome-unstable.x86_64 google-chrome-unstable.x86_64 google-chrome-unstable.x86_64
Last metadata expiration check performed 0:01:16 ago on Sat Dec 12 08:58:40 2015.
[MIRROR] google-chrome-unstable-49.0.2587.3-1.x86_64.rpm: Curl error (28): Timeout was reached for http://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-unstable-49.0.2587.3-1.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 120 seconds]
[FAILED] google-chrome-unstable-49.0.2587.3-1.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success          
The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 99, in __exit__
    self.close()
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 297, in close
    self._store_persistent_data()
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 183, in _store_persistent_data
    self._tempfile_persistor.save()
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 485, in save
    data = set(self._get_json_db(self.db_path))
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 417, in _get_json_db
    default = json.loads(content)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 1 column 6636469 (char 6636468)
"

Second try: see attachment with --verbose switch

Description of problem:
Can't download google-chrome

Version-Release number of selected component (if applicable):
dnf-yum-1.1.4-2.fc22.noarch
dnf-1.1.4-2.fc22.noarch
python-dnf-plugins-core-0.1.14-1.fc22.noarch
python-dnf-1.1.4-2.fc22.noarch
python3-dnf-1.1.4-2.fc22.noarch
python-dnf-plugins-extras-common-0.0.11-1.fc22.noarch
dnf-plugins-core-0.1.14-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.11-1.fc22.noarch
dnf-conf-1.1.4-2.fc22.noarch

How reproducible:
Usually works. This morning, got above output, and again in verbose mode.

Steps to Reproduce:
1. dnf download google-chrome-unstable.x86_64 google-chrome-unstable.x86_64 google-chrome-unstable.x86_64

Actual results:
dnf failure

Expected results:
google-chrome update

Additional info:
Duplicate name that I got from dnf check-update was deliberately left in. A duplicate should be ignored, or give a clear diagnostic.

Comment 1 Peter H. Jones 2015-12-12 15:05:14 UTC
I tried dnf download a couple of times, and got "Connection Reset by Peer" messages. I finally succeeded by using
"wget -c http://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-unstable-49.0.2587.3-1.x86_64.rpm" instead of dnf download.

In conclusion, I suggest this was a network problem that resulted in an obscure error message.

Comment 2 Honza Silhan 2015-12-14 12:11:54 UTC
Hi, so you have seen this traceback just once? Can you post output of `cat /var/cache/dnf/expired_repos.json`, please?

Comment 3 Peter H. Jones 2016-01-04 13:03:18 UTC
That file contains just "[]". I suppose I would have had to capture that content just after the problem ocurred.

I haven't seen this problem since. If I do, I'll post the file. Thanks for the offer of help.

Comment 4 Honza Silhan 2016-01-11 12:04:52 UTC
The problem of downloading Google chrome were temporary connection issue. The traceback bug could not be identified without providing json files in `/var/cache/dnf`. If you see this error again, please, attach the mentioned corrupted file and reopen.