I added firebase crash reporting in my xamarin ios project, it seems everything is fine but no logs in console ... I also have push notifications implements and it works fine..
In AppDelegate I call initialization:
Firebase.Analytics.App.Configure();
Here is packages i added :
rgetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.CloudMessaging" version="1.2.2" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.Core" version="3.5.2" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.CrashReporting" version="1.1.5.1" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.InstanceID" version="1.0.9" targetFramework="xamarinios10" />
Also, I add before build command as it is documented in components page
sh ${ProjectDir}/scripts/FirebaseCrashReporting/xamarin_upload_symbols.sh -n ${ProjectName} -b ${TargetDir} -i ${ProjectDir}/Info.plist -p ${ProjectDir}/GoogleService-Info.plist -s ${ProjectDir}/service-account.json
Also, uploaded debug symbols from terminal :
sh scripts/FirebaseCrashReporting/xamarin_upload_symbols.sh -n App.iOS -b bin/iPhone/Debug -i Info.plist -p GoogleService-Info.plist -s service-account.json
It takes longer but is done. Is there any problems regarding package versions of something known issue?
If i call log after configuration in AppDelegate inside Finishing launching
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Firebase.Analytics.App.Configure();
Firebase.CrashReporting.CrashReporting.Log("blah");
}
log says that something in wrong :
2017-08-24 16:27:55.611 MYAPP.iOS[285:50120] You've implemented
-[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but
you still need to add "remote-notification" to the list of your
supported UIBackgroundModes in your Info.plist. Resolved pending
breakpoint at 'AppDelegate.cs:141,1' to void
MYAPP.iOS.AppDelegate.<>c.b__17_0 (object sender,
Foundation.NSNotificationEventArgs e) [0x00007]. 2017-08-24
16:27:56.048: FIRMessaging library version 1.2.2
2017-08-24 16:27:56.068 MYAPP.iOS[285:50120] *** -[NSKeyedUnarchiver
initForReadingWithData:]: data is NULL 2017-08-24 16:27:56.069:
FIRMessaging AppDelegate proxy enabled, will
swizzle app delegate remote notification receiver handlers. Add
"FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-08-24 16:27:56.070 Chronos.iOS[285]
[Firebase/Crash][I-CRA000004] Successfully initialized
** Unknown exception behavior: 0
From the log, it seems like the only problem is this message:
You've implemented -[
application:didReceiveRemoteNotification:fetchCompletionHandler:], but
you still need to add "remote-notification" to the list of your
supported UIBackgroundModes in your Info.plist. Resolved pending
breakpoint at 'AppDelegate.cs:141,1' to void MYAPP.iOS.AppDelegate
Other messages seem to be just some additional information from Firebase Message SDK.
*** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
Is a message from XCode that the one of the SDKs is using the keychain and provides a nil object to that method.
Related
I am using symfony 5.4.4.
I encounter a problem when I try to connect a user without launching the php server (I want to work in production mode).
I used make:user commands to create the User entity. Then I used the make:auth and make:registration-form commands to generate the login and registration forms.
everything works perfectly when I run the symfony server with the symfony serve command. On localhost:8000 I am able to register and login users with no problem.
I then followed the symfony documentation on deployment as I want my application to run in a server accessible from a private network. I then ran the commands:
composer require symfony/requirements-checker to check
composer install --no-dev --optimize-autoloader
Then I updated the .env file
APP_ENV=prod
APP_DEBUG=0
before clearing the cache with: php bin/console cache:clear
And finally I added rewrite rules with the command: composer require symfony/apache-pack.
now I access my application from any computer (example: http://localhost/myproject/public/user/4) in the network and I navigate without problems on the links.
However, when I try to login a user, it doesn't work.
And when I try to enter one, it works.
In summary, the login works on localhost:8000 but does not work on localhost/myproject/public while all other forms work.
Can you help me ? thank you in advance.
It's OK !
I added the method below into my App/src/Authenticator.php class
Notice : it does not work without the return type "bool" of the function
public function supports(Request $request): bool
{
return self::LOGIN_ROUTE === $request->attributes->get('_route')
&& $request->isMethod('POST');
}
I hope it will be useful to someone!
Thanks to all and especially to Cerad for the link !
In our .NET Core 3.1 project (REST API), we've multiple NuGet packages. General packages comes from the nuget.org source, some custom made packages are retrieved from a private source.
In Azure DevOps, we've a build pipeline with a task to restore the NuGet packages. Here we saw that every packages was checked with every source. A general package such as Swashbuckle.AspNetCore.SwaggerGen was also searched on our private source.
Due to the amount of requests from DevOps, the first attempt of the pipeline was interpreted as a DOS attack on our system. When the failed run was started again, the task succeeds without any error.
- task: DotNetCoreCLI#2
displayName: dotnet restore
inputs:
command: 'restore'
projects: '**/*.sln'
feedsToUse: 'config'
nugetConfigPath: 'src/NuGet.config'
In the tasks detail, we see the below message returning for every package.
GET private_source/nuget/FindPackagesById()?id='xunit.analyzers'&semVerLevel=2.0.0
Retrying 'FindPackagesByIdAsyncCore' for source 'private_source/nuget/FindPackagesById()?id='Microsoft.AspNetCore.Mvc.Razor'&semVerLevel=2.0.0'.
An error occurred while sending the request.
The response ended prematurely.
How can we avoid that every package in our solution, is checked at every NuGet source? Or what can we change to get a successfull build the first time?
NuGet recently introduced the feature, called Package Source Mapping: https://devblogs.microsoft.com/nuget/introducing-package-source-mapping/
Here's the nuget.config snippet from the blog post:
<!-- Define my package sources, nuget.org and contoso.com. -->
<!-- `clear` ensures no additional sources are inherited from another config file. -->
<packageSources>
<clear />
<!-- `key` can be any identifier for your source. -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="contoso.com" value="https://contoso.com/packages/" />
</packageSources>
<!-- Define mappings by adding package ID patterns beneath the target source. -->
<!-- Contoso.* packages will be restored from contoso.com, everything else from nuget.org. -->
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="contoso.com">
<package pattern="Contoso.*" />
</packageSource>
</packageSourceMapping>
Regarding the error message:
An error occurred while sending the request. The response ended prematurely.
This suggests there's something wrong with the server or networking. A good nuget server should return HTTP 404 for packages that doesn't exist on it. Implementing package source mapping might not solve your restore problem.
I suggest creating an Azure Devops Artifacts feed having upstream source both from nuget.org and your private feed. There is no other way you can use multiple sources to do partial restore.
How can we avoid that every package in our .NET Core 3.1 project, is checked at every NuGet source during Azure DevOps pipeline?
I am afraid there is no such out of box way to resolve this restriction.
That's because no matter how we set the resource, when we restore the package for the first time, nuget.exe will iterate over each resource for every package. This problem will be alleviated when we run the pipeline again, because it is from nuget.org The packages will be cached in our private feed. When we restore again, it will be retrieved from the private feed first:
Check my previous thread for some more details.
Besides, If you want to avoid this problem the first time, you can try not to restore the entire .sln file, you can choose package.configs for the specify reject:
I'm working on a MSI installer for our java app using Jpackage.
Versions:
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing
jpackage 17.0.1
OS Name: Microsoft Windows Server 2019 Datacenter
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free
Jpackage Usage:
jpackage --input ./home ^
--name "Acme Application" ^
--main-jar app.jar ^
--main-class org.springframework.boot.loader.JarLauncher ^
--java-options "-splash:$APPDIR/splash.png" ^
--java-options -Xmx2g ^
--icon resources/package.ico ^
--win-shortcut ^
--win-menu ^
--type msi ^
--app-version %1
Upgrade Process
The installation works fine and everything runs well. The upgrade process also works fine under normal circumstances. When the user tries to run the new MSI package while the application is still running, the MSI installer prompts the user to close the application before continuing:
Selecting to close the application and continue causes the application to close on the users desktop but the installer then prompts the user again with the same dialog. Selecting the same option (close and continue), allows the installer to complete but the user is then warned that they need to restart.
Upon restarting, it appears that application version 1.0.0 is still running. Checking the jar file signature before and after shows that installer failed to overwrite the original.
Event Viewer
Checking the event viewer, I'm only seeing a few things of interest:
Windows Installer requires a system restart. Product Name: *******. Product Version: 1.0.1. Product Language: 1033. Manufacturer: Unknown. Type of System Restart: 1. Reason for Restart: 0.
and
The Windows Installer initiated a system restart to complete or continue the configuration of '*******'.
Failing to Stop the Application
I also noticed that the application is not completely stopping. Looking at the task manager, it shows the application running under the user and then moves to background processes. This leads me to believe that it's still locking the jar file. The application stops normally under other circumstances so I'm not sure what's different here.
I'm assuming that I need to solve this mystery but I have no idea why the application wouldn't respond to the installer's close signal while working with everything else.
Alright, I've done some digging and this is related to JavaFX's lifecycle. Simply overriding the Application.stop method is not enough to properly shutdown on these types of close requests.
Two changes to my application fixed the issue:
Register a EventHandler on the primary stage onCloseRequest
Here I initialize my spring application as well as register the event handler to stop the application:
#Override
public void start(Stage stage) {
applicationContext.publishEvent(new StageReadyEvent(stage));
stage.setOnCloseRequest(event -> stop());
}
Ensure you have a call to System.exit in your EventHandler
Platform.exit is not enough to close the application under these circumstances:
#Override
public void stop() {
log.info("Shutting down application...");
applicationContext.close();
Platform.exit();
log.info("Shutdown complete");
// System.exit is required or the app will move to a background process on uninstall/upgrade
// events from Windows MSI installer
System.exit(0);
}
When I extract the app as apk and test it on a real Android device, it crashes, but when I run it as debug it works fine. The cause of the error is pub.dev --> video_editor library. I got this error output from Firebase:
Caused by java.lang.UnsatisfiedLinkError:
Bad JNI version returned from JNI_OnLoad in "/data/app/com.projectName--b7nYjATxtDAUxnuC_rpnQ==/base.apk!/lib/armeabi-v7a/libmobileffmpeg.so": 0
java.lang.Runtime.loadLibrary0 (Runtime.java:1016)
java.lang.System.loadLibrary (System.java:1657)
com.arthenica.mobileffmpeg.Config.<clinit> (Config.java:146)
com.arthenica.mobileffmpeg.Config.nativeFFprobeExecute (Config.java)
com.arthenica.mobileffmpeg.FFprobe.execute (FFprobe.java)
com.arthenica.mobileffmpeg.FFprobe.getMediaInformationFromCommandArguments (FFprobe.java)
com.arthenica.mobileffmpeg.FFprobe.getMediaInformation (FFprobe.java:48)
com.arthenica.flutter.ffmpeg.FlutterFFmpegGetMediaInformationAsyncTask.doInBackground (FlutterFFmpegGetMediaInformationAsyncTask.java:21)
com.arthenica.flutter.ffmpeg.FlutterFFmpegGetMediaInformationAsyncTask.doInBackground (FlutterFFmpegGetMediaInformationAsyncTask.java:2)
android.os.AsyncTask$2.call (AsyncTask.java:333)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
java.lang.Thread.run (Thread.java:764)
Enabling ProGuard on releases older than v0.2.4 causes linking errors. Please add the following rule inside your proguard-rules.pro file to preserve necessary method names and prevent linking errors.
-keep class com.arthenica.mobileffmpeg.Config {
native <methods>;
void log(int, byte[]);
void statistics(int, float, float, long , int, double, double);
}
and also make sure that mavenCentral() is defined as a repository in your build.gradle and it is listed before jcenter().
Refer from flutter ffmpeg documentation https://pub.dev/packages/flutter_ffmpeg
I am trying to figure out the parameters and class fields to post and accept "build notes"(example text below) info,I am trying to design my controller as follows?would the following work for accepting a long text?
Controller:
public IEnumerable<class name> GetBuildNotes([FromBody] Buildnotes buildNotes>)
{
...........
........
}
Buildnotes class:
public class buildnotes
{
public string build_notes. --> this goes to a database column build_notes of type longtext
.....
}
Long text:
CHECKOUT POINT
cld3 - 1855314
cmn - 1855287
Known issue
[testsuite: STA_5G_VHT]: COMDEBUG-276224: consistent crash : APPS Crash - Kernel BUG at ffffff82dc55994c [PC at reg_todo+0x1dc/0x260] [LR at reg_todo]
if you observe build loading issue.please use fastboot.exe path : \\\8998_adb_drivers
Latest META only supported on BIN1 MTP. With BINA sometimes its works. but observed random boot-up crash
BIN B MTP doesn't boot up with latest target meta
Expected behavior :Bootloader UI updated with Boot verify feature in UEFI where the signing of the images is verified.
You can use below script to determine the Bin / Sub BIN type and IDDq leakage values thru adb.
Bring up device in adb mode
Source : \\location\team\LA\8998_hw_type\FinalScript
Usage : python bining.py
Please run "adb disable-verity" to avoid "adb remount/push" related issue
Sl4a/ PMC/ Acts/ Comms:Google_testing
$[apps_crm]\source\google_testing
WAPI build
CCX build location
e
HOT FIX
HW used for BIT sanity
Recommendation to use MPT with chipname 2.0 card. please replace chipname card on MTP having MCN ends with 001/003/005
CDT programming forV2 HW
http://qwiki.company.com/qct-drvsw/8998
Pre-built wiki
http://qwiki.company.com/com_wCOM/com-CBI/Build_With_External_AU#BUILDING_DRIVER_POINTING_TO_APPS_CRM
http://qwiki.company.com/com_wCOM/com-CBI/Build_With_External_AU#Build_ROME_and_chip_for_SP_:_com1234.LA.0.1
Build loading procedure
Load BIT (CI) Meta
ENGG WLAN FW load on top of BIT META
adb root
adb remount
adb shell mount -o rw,remount /firmware
adb push wlanmdsp.mbn /firmware/image
adb reboot
ENGG BT FW load on top of BIT META
adb root
adb remount
adb shell mount -o rw,remount /bt_firmware
adb push * /bt_firmware/image
adb reboot
Yes you can, I'm guessing you just need to ensure that the object you're passing from your client application matches your Buildnotes class structure.
Try this:
How to pass json POST data to Web API method as object