CRYPTO_internal error sending iOS Debug build

903 views
Skip to first unread message

P5music

unread,
Apr 3, 2021, 10:23:07 AM4/3/21
to CodenameOne Discussions
I am trying to build for iOS debug.
I send the build to the server but it's in error.

In the log all seems to be fine (all returns 0 exit code)
except for the last lines:

4493528684:error:0DFFF0A8:asn1 encoding routines:CRYPTO_internal:wrong tag:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c:1144:
4493528684:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c:717:
4493528684:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c:646:Field=version, Type=PKCS12
Process return code is 1

This is not related to my project as far as I understand.
What's the problem?
Thanks in avance

Shai Almog

unread,
Apr 3, 2021, 9:53:42 PM4/3/21
to CodenameOne Discussions
I'll need the full logs to tell for sure. How did you generate the P12 certificate files?
Did you use our wizard?

P5music

unread,
Apr 4, 2021, 11:13:06 AM4/4/21
to CodenameOne Discussions
Please see the attached log file.
I used the wizard and I got two cer files, then I saved them. 
I put the development cer file in the settings for the iOS build, and the provisioning file downloaded from the developer account.
Maybe the P12 files were not presented to me by the Wizard I think, I do not know if you mean the cer files themselves.
Regards

error_log.txt

Shai Almog

unread,
Apr 4, 2021, 9:27:10 PM4/4/21
to CodenameOne Discussions
CER files won't work. You need to generate P12 files using the certificate wizard or use a process to generate them. CER isn't a P12 file and you can't rename them. A P12 contains a key pair whereas a cer file contains only one key.

After running the wizard you will need to edit and re-download the provisioning since you use ios.icloud.CloudDocuments=true
You need to enable this in the provisioning too as explained in the file system cn1lib. Alternatively if you no longer use this you can remove the build hint.

P5music

unread,
Apr 5, 2021, 7:36:30 AM4/5/21
to CodenameOne Discussions
I already run the wizard. I do not remember about P12 files. Where would they be saved on my W10 machine?
If I find them have I to run the wizard again to update the ios.icloud.CloudDocuments=true provisioning settings? Or are they just good?
Regards

Shai Almog

unread,
Apr 5, 2021, 9:37:09 PM4/5/21
to CodenameOne Discussions
They should be in the .codenameone directory or somewhere like that. If not you'll need to run the wizard again.
The icloud setting can't be done from the wizard. You'll need to go to the apple website after running the wizard to edit the profile there and download a new version: https://developer.apple.com/account/ios/profile/

P5music

unread,
Apr 6, 2021, 8:52:21 AM4/6/21
to CodenameOne Discussions
I cannot remember having added that icloud settings. Maybe something in my app makes that appear automatically.
What could it be?
If it is not necessary I can remove it from build hints. My app just uses AppArg and sendMessage to  exchange files with the system. It also has some private files.
Maybe also cloud files could trigger the AppArg?
Regards

Shai Almog

unread,
Apr 6, 2021, 9:46:08 PM4/6/21
to CodenameOne Discussions
The file picker cn1lib or similar cn1lib. If you remove it you will need to remove the setting manually.

P5music

unread,
Apr 7, 2021, 3:27:18 AM4/7/21
to CodenameOne Discussions
I attempted at reintroducing the import file feature in my app.
I tried also with JDK8 but I get the runtime error below.
see also

#1)   (see also #2 and #3 below)
I see that the app is run by this instruction
C:\Users\user\.jdks\adopt-openjdk-1.8.0_282\bin\java.exe
so the JDK should be right.


java.lang.ClassNotFoundException: com.codename1.ext.filechooser.FileChooserNativeImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:997)
at com.codename1.impl.javase.ClassPathLoader.findClass(ClassPathLoader.java:269)
at com.codename1.impl.javase.ClassPathLoader.loadClass(ClassPathLoader.java:111)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.codename1.system.NativeLookup.create(NativeLookup.java:82)
at com.codename1.ext.filechooser.FileChooser.nativePeer(FileChooser.java:66)
at com.codename1.ext.filechooser.FileChooser.isAvailable(FileChooser.java:95)
at com.myapp.app.myapp.lambda$initUI$4(myapp.java:319)
at com.codename1.ui.Command$1.actionPerformed(Command.java:334)
at com.codename1.ui.SideMenuBar$CommandWrapper.actionPerformed(SideMenuBar.java:1811)
at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:349)
at com.codename1.ui.Button.fireActionEvent(Button.java:679)
at com.codename1.ui.Button.released(Button.java:728)
at com.codename1.ui.Button.pointerReleased(Button.java:835)
at com.codename1.ui.LeadUtil.pointerReleased(LeadUtil.java:153)
at com.codename1.ui.Form.pointerReleased(Form.java:3817)
at com.codename1.ui.Component.pointerReleased(Component.java:4710)
at com.codename1.ui.Display.handleEvent(Display.java:2359)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1244)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1162)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
[EDT] 0:0:11,465 - Exception: java.lang.ClassNotFoundException - com.codename1.ext.filechooser.FileChooserNativeImpl

#2)
If I try to send the Android build the mechanism is broken again like some time ago:
(I see that lib/impl/stubs/com.codename1.ext.filechooser is in red
with "library source code does not match the bytecode for class FileChooser".)

Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1425)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:834)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.Main.start(Main.java:190)
at org.apache.tools.ant.Main.main(Main.java:274)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:31)

#3)
When I try to create a provisioning profile I see that no options are allowed to include the capabilities.

Regards

Shai Almog

unread,
Apr 7, 2021, 11:17:13 PM4/7/21
to CodenameOne Discussions
1. That's either a bad classpath or a missing cn1lib refresh. It only happens in the simulator though
2. This error is too late in the game. Is this an error from the client or the server? Either way I'll need more context lines

P5music

unread,
Apr 8, 2021, 4:14:31 AM4/8/21
to CodenameOne Discussions
The Apple dev page asks me for this
"The display set ID you enter will not be editable and must match the display set ID entered in your binary's info.plist. The reference name and display set language details can be edited at any time."

example hint -> com.providername.displaysetname

I do not have any in my ios.plist_injected or other build hints.
It seems that it could be created automatically(?).
What value is to be entered there?
Regards

Shai Almog

unread,
Apr 8, 2021, 11:17:53 PM4/8/21
to CodenameOne Discussions
Odd. Display id is a new name. But it looks like this should match the app package name which is what we use for the generated provisioning profile.

P5music

unread,
Apr 9, 2021, 3:19:01 AM4/9/21
to CodenameOne Discussions
Excuse me,
but the more I read the documentation about that id, the more it seems that FileChooser is not related to the Cloud container I should be creating.
In my app especially FileChooser is just to select a file, so no container is involved on my app side. if the user wants to select from his/her own cloud it is not my app's business.
Have you more information on why that build hint is present?
Regards

Shai Almog

unread,
Apr 10, 2021, 12:20:08 AM4/10/21
to CodenameOne Discussions

P5music

unread,
Apr 10, 2021, 2:08:15 AM4/10/21
to CodenameOne Discussions
As far as I understand at the time that constraint was added to the FileChooser library
it was not known that Apple would ask to create a cloud container.
I do not know what it does mean creating that container. 
However it the developer is forced to have one just to be able to use the FileChooser library.
Regards

P5music

unread,
Apr 16, 2021, 11:29:23 AM4/16/21
to CodenameOne Discussions
If I have not the iOS cloud files build hints but I have the filechooser functionality

 but very simple, just to choose a file locally, is it possible that

the app does not crash if I include the filechooser simple feature and somehow remove the build hint?
Is it possible?
Thanks

Shai Almog

unread,
Apr 16, 2021, 11:41:09 PM4/16/21
to CodenameOne Discussions
I don't know. I'm not familiar with the internals of that library.
Reply all
Reply to author
Forward
0 new messages