iOS build on PC paired to Mac - app.dSYM.zip fails, 'Show IPA File on Build Server' missing, errSecInternalComponent, 'IPA is not a valid zipfile' - build

I have a Xamarin iOS application in VisualStudio 2019 on a Windows 10 PC. I build it on the PC, and when possible then right click the project and choose Show IPA File on Build Server, then on my Mac I upload the file to the app store using Transporter. I am encountering these issues:
Whenever I build, the build says it failed with message "There was an error unzipping the file bin\Ad-Hoc\MyApp.app.dSYM.zip: Could not find a part of the path 'C:\MyDirectory\MyApp.iOS\bin\Ad-Hoc\MyAppiOS.app.dSYM'." This has not historically caused any issues - we have still been able to upload the IPA to the app store and deploy our app - but I include it in case it's relevant to the other issues.
Sometimes, my build fails saying it "has been disconnected while waiting a post repsonse to topic xvs/Build/.../execute-task/MyApp.iOS/...Codesign" or "Unable to connect to Mac Server with Address='192.111.111.111' and User='My Username'. The build can't continue without a connection". I'm assuming a wifi issue must cause this, though the machines are all right next to one another and next to my router so seems odd. Occasionally when I try to pair to the Mac, I also get the message "Error, Couldn't connect to com. Please try again. An attempt was made to access a socket in a way forbidden by its access permissions." In any case, makes me wonder if there's any way for me to 1) hardwire the Mac to the PC or 2) build directly on the Mac instead of through VS on the PC, even though I write the code on the PC?
During the build, I periodically get an error "/Users/myUser/Library/Caches/Xamarin/mtbs/builds/MyApp.iOS//bin/Ad-Hoc/MyAppiOS.app: errSecInternalComponent MyApp.iOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 2003". If I lock all keychains on the Mac this goes away on the next build, but then it reappears a few builds later.
Once the build finishes with just the .dSym.zip error, most of the time, the "Show IPA File on Build Server" option still does NOT show up (not greyed out - it is not present in the menu at all) when I right click the iOS project. To get around this, I have been copying the file over to the Mac via S3. I'm wondering why the option doesn't show up, and if there's a way to just find the built file on the Mac rather than copying it over from Windows?
I then use Transporter on the Mac to upload the IPA file to the Apple Store. It always is able to read the version information and says the file is Delivered. However, often I then get an email from Apple saying the build failed because "ITMS-90688: This IPA is invalid - While unzipping the IPA we received the error message [ End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of MyAppiOS.ipa or MyAppiOS.ipa.zip, and cannot find MyAppiOS.ipa.ZIP, period. ] Verify that the IPA can be unzipped before reattempting your upload.".
In response to that error, I've tried to unzip the IPA file and I find that on the PC it is always unzippable if I change the extension to .zip, and on my Mac, I can always unzip it to see the Payload directory, and the MyAppiOS item inside it can never be opened - I get a popup "You can't open the application 'MyAppiOS' because it is not supported on this type of Mac." - in any case, the files Apple likes and the ones it doesn't look the same to me when I try unzipping.
My only ideas are to try to figure out how to open and build the app on my Mac, to call my router company, and to keep trying and trying, over and over again, until finally one of the builds works... which sometimes literally takes hours.
Many thanks for any help you are able to offer!

Related

Issue with launching QEMU simulator from STM32CubeIDE

I'm trying out STM32CubeIDE, and I've been trying to get it to work with the GDB QEMU debugging plugin that's part of the Eclipse CDT package. I've been able to create the project and debug configuration for my STM32F4-Discovery board, and the debugger partially launches, however, just as the simulator starts up, the GUI window it creates suddenly crashes and I get this error:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:1234
Error message from debugger back end:
Truncated register 18 in remote 'g' packet
Failed to execute MI command:
-target-select remote localhost:1234
Error message from debugger back end:
Truncated register 18 in remote 'g' packet
Truncated register 18 in remote 'g' packet
I think this is caused by some mismatch between the CDT plugin I installed and the GCC toolchain that shipped with my installation of Ubuntu 20.04. However, I'm not sure how to fix this.
Is there anything I try to fix this?
So it looks like there were a couple factors as to why this wasn't working. First off, the error messages that I was getting immediately after the GUI debugger terminated were due to an incorrect installation of the arm-none-eabi-gdb package. In order to fix this, I downloaded the package from the ARM site and followed the instructions detailed here. After installing the arm-none-eabi-gdb package again, I went into the project debug configuration settings, navigated to the "debugger" tab in this window, and then changed the GDB executable path from the variables the IDE had set for me to the actual GDB executable path (in this case /usr/bin/arm-none-eabi-gdb).
After that was done, the debugger would no longer immediately terminate, but I was still getting some errors in console shortly after it started (see below). In addition, the debugger GUI would produce no meaningful output, and Ubuntu would warn that the process had frozen.
NVIC: Bad read offset 0xd88
qemu-system-gnuarmeclipse: Attempt to set CP10/11 in SCB->CPACR, but FP is not supported yet.
To solve this, I right clicked the project in the project explorer panel of the IDE, then went to C/C++ build section, then to the Settings section under that, and then finally to the "Tool settings" section of this menu. Under "MCU settings", there are two options for "Floating point unit" and "Floating point ABI", which I changed to "None" and "Software implementation" respectively. After saving these configuration changes, I went to the system_stm32f4xx.c file under the src/ directory of the project, and commented out these lines:
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
#endif
After that, I cleaned the project, rebuilt it, and relaunched the debugger. It then functioned normally.

Exit 1 when calling mono_jit_init

Hi, I try to embed mono in a c++ application on windows. I followed http://www.mono-project.com/docs/compiling-mono/windows/ and I have my headers, lib and dll built for win64.
I wrote a simple app that just calls
MonoDomain *domain;
domain = mono_jit_init("ConsoleApplication1.exe");
Everything builds and link find but when I run my program, I can break and step until the mono_jit_init call. Then the apps performs an exit1 and I can't see what's wrong.
I tried both release and debug.
Any ideas on how to find the issue? Properly embed mono?
Thanks, JNQ
Your application probably fails on loading Mono libraries.
You can use Process Monitor (https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) to find out what exactly fails for you:
Run Process Monitor
Set Process Monitor filter to "[Process Name] [is] [Your process name, e.g. ConsoleApplication1.exe] then [Include]"
Run you program and lookup for "CreateFile" operations with "NAME NOT FOUND" Result and see Path column to find out what file is missing
In my case it was a failure on loading mono mscorlib.dll from lib\mono\4.5\mscorlib.dll so copying the files from the Mono installation to the path pointed by Process Monitor has helped.

Facebook Actionscript API examples not compiling - application descriptor not found

Trying to run some of the desktop(AIR) samples located here
http://code.google.com/p/facebook-actionscript-api/
No matter what I try get the error message
Process terminated without establishing connection to debugger.
application descriptor not found
But as far as I can tell there IS a proper descriptor file (XML) present in my bin-debug folder.
Anyone have an idea what is happening? Could the issue have something to do with the Flexsdk I am using (4.6) when combined with the latest AIR 3.4?
This is my application descriptor file WITHOUT most of the commented code
<id>MediaUploadDemo</id>
<filename>MediaUploadDemo</filename>
<name>MediaUploadDemo</name>
<version>v1</version>
<initialWindow>
<content>MediaUploadDemo.swf</content>
</initialWindow>
Found most of my answers here
http://alpha-beta-pruning.blogspot.ca/2011/06/migrating-flex-3-project-to-flex-45.html
Key paragraph
'Each AIR sdk tends to have it's own application descriptor file formatting which means that an application that was created with AIR 2.0 must "migrate" its descriptor file to the new AIR 2.7 sdk. My suggestion is creating from scratch a new project that targets the new sdk, just so we can take its descriptor file, copy/paste it to our "old" project and change the necessary values to adapt our project (such as project name, etc).'

Firebreath plugin on windows fails to load in chrome

I am busy converting by existing firebreath plugin here to use gpgme instead of making calls via the OS and the gpg binary.
I have managed to get the code to compile in windows using VS 2010 on a x32 system but after loading the plugin into chrome I can not access the npapi code at all. Even simple version calls fails.
When loading the plugin I get no visible errors but when using sawbuck log viewer for chrome I get the erorr messages below.
.\renderer\webplugin_delegate_proxy.cc 347 PluginMsg_Init returned false
..\plugins\npapi\webplugin_impl.cc 271 Couldn't initialize plug-in
I have tried to use my code with both firebreath 1.4 and 1.6 and neither versions work. After some simple debugging it seems that using any code provided by gpgme (whether its called or not) causes the plugin to break.
I came to this conclusion by doing the following.
Created a new project with firebreath (versions 1.4 and 1.6)
Add the gpgme.h headers to gmailGPGAPI.cpp and changed nothing else aside from adding the required reference paths to the project.
Build the project to create the dll (this generates the dll fine).
Replace the existing ddl in my project with the dll in step 2 and test it with the following piece of code
plugin = document.createElement('object'); plugin.id = 'plugin';
plugin.type = 'application/x-gmailtest';
document.body.appendChild(plugin);
console.log("my plugin returned: "+ plugin.valid);
console.log("my plugin returned: " + plugin.version);
This returns valid = true and the version returns what ever i set it to.
I then modified gmailGPGAPI.cpp to now return the gpg version by calling gpgme_check_version(NULL) in the version method. I used that method because its probably the simplest returning function that I could test with.
Build the plugin and copy dll to chrome extension as in step 3-4. The plugin builds fine again as expected.
Load the plugin and try to execute the code in step 4 at which point it now just returns undefined for any property or method i try to access on the plugin. No errors are printed to the console or anywhere else in chrome except for the error logged to sawbuck.
I have got no idea where to look or what to try since I cant seem to get an actionable error to work against. I have also reduced by test code to the point where its just a new project with a one line change to make it easier to find the problem.
I should note the code in the repo builds fine in linux/OSX and loads into chrome correctly so I know at some level my code does work.
Two possible paths:
You may have a DLL dependency that isn't available which keeps the plugin from loading; if you run regsvr32 on it in the state where it doesn't work on chrome, does it work?
Your plugin may be loading and then crashing. Start chrome with --plugin-startup-dialog and then when it pops up a dialog warning you that a plugin is about to be loaded attach to that process and see if the process crashes. At this point you can also set breakpoints to try to figure out how far it gets.
Double check your metadata in PluginConfig.cmake as well; sometimes unusual characters in some fields can cause issues like this.

Windows Mobile fails to uninstall

Testing my app on some WM Std 6.1 I found out that it fails to uninstall. I receive this error:
“[app] was not completely removed. Do you want to remove it from the list of installed programs?"
Checking my setup.dll I can tell that Uninstall_Init and Uninstall_Exit are being called each time but all the files stays (they are not locked, I’ve checked) and its entry doesn’t disappear from the list of installed apps (whether I choose it to stay or not).
There are really only three possible reasons for this:
Uninstall_Init doesn't return continue.
Uninstall_Exit doesn't return continue.
The installer engine failed.
If you have verified that 1 & 2 then ok then 3 is going to be tough to figure out.
Some problems that I have encounted:
Check the DLL dependencies of your setup DLL and try to remove as many as possible. I've found that dependencies to MSXML can cause problems.
Remove any registry setup in your INF file, move it into your setup dll. I've found this to cause the uninstall to fail randomly on random devices because of this.
What I needed up doing for existing customers is write a uninstall application to remove our application manually if the uninstall worked. If you do need to write a manual unistall you need to do the following:
* Remove all your registry keys
* Remove all your files
* Remove registry key HKLM\Security\AppInstall{app name}
* In WM6.1 you need to remove a database record from the EDB database "SwMgmtMetadataStore" where the SWT_INSTALL_NAME_TAG property equals your {app name}.
Another thing worth investigating is the install log created by the cab install/uninstall process.
You can find this within the \Application Data\Volatile\ directory (usually called setup.log).
Copying this file to your desktop PC and opening it in notepad may provide more clues (such as files in use during uninstall) as to why the uninstall did not succeed.
I had several CAB files that worked perfectly on WM 6.0, but stopped working in WM 6.1.
Turns out it was because either the AppName or the Manufacturer had spaces in. Removing the spaces fixed the CAB files and they now successfully uninstall in WM 6.1!!