Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

construct.core.ArrayError: ('expected 51, found 9', MappingError('no decoding mapping for 50 [cmd]',)) #26

Open
soleimanim opened this issue Aug 11, 2019 · 4 comments

Comments

@soleimanim
Copy link

Could not sign IPA due to the following error:

File "/usr/local/bin/isign", line 4, in <module> __import__('pkg_resources').run_script('ak-isign==0.10.14', 'isign') File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 658, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1438, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/EGG-INFO/scripts/isign", line 251, in <module> isign.resign(app_path, **kwargs) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/isign.py", line 83, in resign alternate_entitlements_path) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/archive.py", line 412, in resign ua.bundle.resign(deep, signer, provisioning_profile, alternate_entitlements_path) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/bundle.py", line 294, in resign super(App, self).resign(deep, signer) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/bundle.py", line 181, in resign self.sign(deep, signer) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/bundle.py", line 176, in sign executable = self.signable_class(self, self.get_executable_path(), signer) File "/usr/local/lib/python3.6/dist-packages/ak_isign-0.10.14-py3.6.egg/isign/signable.py", line 40, in __init__ self.m = macho.MachoFile.parse_stream(self.f) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 198, in parse_stream return self._parse(stream, Container()) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 672, in _parse subobj = sc._parse(stream, context) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 853, in _parse obj = self.cases.get(key, self.default)._parse(stream, context) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 672, in _parse subobj = sc._parse(stream, context) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 271, in _parse return self.subcon._parse(stream, context) File "/usr/local/lib/python3.6/dist-packages/ak_construct-2.5.2-py3.6.egg/construct/core.py", line 447, in _parse raise ArrayError("expected %d, found %d" % (count, c), sys.exc_info()[1]) construct.core.ArrayError: ('expected 51, found 9', MappingError('no decoding mapping for 50 [cmd]',))

@MuAlphaOmegaEpsilon
Copy link

Same on the current master (0.10.16), using --verbose:

Signing with apple_cert: .../lib/python3.7/site-packages/isign/apple_credentials/applecerts.pem
Signing with key: .../ios_devkey.pem
Signing with certificate: .../ios_devcer.pem
Signing with provisioning_profile: .../file.mobileprovision
precheck
path: .../unsigned.ipa
extension match
extension match: .ipa
this is an archive, and a zipfile
found one app
is_native: True
found one app
File .../unsigned.ipa matched as IpaArchive
wrote Entitlements to /tmp/isign-55cx8rsq/Payload/App.app/Entitlements.plist
working on /tmp/isign-55cx8rsq/Payload/App.app/App
removing ua: /tmp/isign-55cx8rsq
Traceback (most recent call last):
  File ".../lib/python3.7/site-packages/construct/adapters.py", line 100, in _decode
    return self.decoding[obj]
KeyError: 50

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../lib/python3.7/site-packages/construct/core.py", line 444, in _parse
    obj.append(self.subcon._parse(stream, context))
  File ".../lib/python3.7/site-packages/construct/core.py", line 672, in _parse
    subobj = sc._parse(stream, context)
  File ".../lib/python3.7/site-packages/construct/core.py", line 288, in _parse
    return self._decode(self.subcon._parse(stream, context), context)
  File ".../lib/python3.7/site-packages/construct/adapters.py", line 104, in _decode
    obj, self.subcon.name))
construct.adapters.MappingError: no decoding mapping for 50 [cmd]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../bin/isign", line 251, in <module>
    isign.resign(app_path, **kwargs)
  File ".../lib/python3.7/site-packages/isign/isign.py", line 83, in resign
    alternate_entitlements_path)
  File ".../lib/python3.7/site-packages/isign/archive.py", line 412, in resign
    ua.bundle.resign(deep, signer, provisioning_profile, alternate_entitlements_path)
  File ".../lib/python3.7/site-packages/isign/bundle.py", line 294, in resign
    super(App, self).resign(deep, signer)
  File ".../lib/python3.7/site-packages/isign/bundle.py", line 181, in resign
    self.sign(deep, signer)
  File ".../lib/python3.7/site-packages/isign/bundle.py", line 176, in sign
    executable = self.signable_class(self, self.get_executable_path(), signer)
  File ".../lib/python3.7/site-packages/isign/signable.py", line 40, in __init__
    self.m = macho.MachoFile.parse_stream(self.f)
  File ".../lib/python3.7/site-packages/construct/core.py", line 198, in parse_stream
    return self._parse(stream, Container())
  File ".../lib/python3.7/site-packages/construct/core.py", line 672, in _parse
    subobj = sc._parse(stream, context)
  File ".../lib/python3.7/site-packages/construct/core.py", line 853, in _parse
    obj = self.cases.get(key, self.default)._parse(stream, context)
  File ".../lib/python3.7/site-packages/construct/core.py", line 672, in _parse
    subobj = sc._parse(stream, context)
  File ".../lib/python3.7/site-packages/construct/core.py", line 271, in _parse
    return self.subcon._parse(stream, context)
  File ".../lib/python3.7/site-packages/construct/core.py", line 447, in _parse
    raise ArrayError("expected %d, found %d" % (count, c), sys.exc_info()[1])
construct.core.ArrayError: ('expected 24, found 10', MappingError('no decoding mapping for 50 [cmd]'))

@jesshub
Copy link

jesshub commented Mar 4, 2021

I'm having the same problem, it seems to just apply to newer/recent ipa files, did anyone manage to fix this?

@subho007
Copy link
Member

subho007 commented Mar 4, 2021

This is no longer maintained, but I'll try to get a patch to fix this

@jesshub
Copy link

jesshub commented Apr 4, 2021

Hi, any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants