Xe10.2.3 and firebase push notification android - debug mode error, do you know how to solve it?

emailx45

Premium
Joined
May 5, 2008
Messages
2,478
Reaction score
2,223
Location
here and there
hi Friends,

Here my problem with "trying" to do one simple apps to "Push Notifications" using:
-> RAD Studio XE10.2.3
-> Firebase services (using only GCM service) by Google with your new changes, broke my app test!

1) First, I have my account in Google, and, on Firebase services, I have my project created and one apps defined.

2) I have my ID and Key to my project/apps! Its ok, for while!

3) My project in RAD Studio, is very simple:
--> 1 form FMX (in blank)
--> 1 component EMSProvider (without any changes or new definitions, all default property for tests)
--> 1 component PushEvents, bind in EMSProvider, without any changes, too!
--> there is not any code source in my project! Just this components above.

4) In my project OPTIONS, I have: (for all config Android (Release or Debug)
--> Entitlement List -> Receice Push notifications = True
--> the Permitions default to any project FMX, like Internet access, etc.. (DEFAULTs)
--> Verions Info -> apiKey = (Nothing) for test of compiling not for Firebase service (GCM) message
......... already tested with my apiKey from Firebase, too! Nothing.

Here my Unit.pas
*****************
unit uFrmMainAppPush;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes,
System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics,
FMX.Dialogs, IPPeerClient, REST.Backend.PushTypes, System.JSON,
REST.Backend.EMSPushDevice, System.PushNotification, Data.Bind.Components,
Data.Bind.ObjectScope, REST.Backend.BindSource, REST.Backend.PushDevice,
REST.Backend.EMSProvider;

type
TFrmMainAppPush = class(TForm)
EMSProvider1: TEMSProvider;
PushEvents1: TPushEvents;
private
{ Private declarations }
public
{ Public declarations }
end;

var
FrmMainAppPush: TFrmMainAppPush;

implementation

{$R *.fmx}

end.

My Project:
https://oload.site/f/RssdHI9eVO4/MobileAndroidPushNotification.rar (just 10KBytes)

My lasts line in my "AndroidManifest.template.xml"
********************
<%activity%>
<service android:name="com.embarcadero.gcm.notifications.GCMIntentService" />
<%receivers%>
</application>
</manifest>
<!-- END_INCLUDE(manifest) -->
*****************
The project compiled and was sent to my smartphone, however, when trying to run I got the error message on the Debug screen of RAD Studio (not on the smartphone):

---->>>> "Can not Bind Address: Address Already In Use Existing"

This for a long time, and several tests. I created more than one project and this message was always displayed.

In this way, the app was run on the smartphone, however, it was "stopped" on the app's only home screen (since there were no other forms in the app).

On the smartphone side, no messages were shown. Only on the RAD Studio screen, in Debug mode. I could, on the smartphone, run the apps and nothing was shown error.

After several attempts, finally the application was compiled and executed without any error screen in RAD Studio, however, this time, before sending the application to the smartphone, now AVG Internet Security 2018 (antivius) "got" and showed a screen saying that the file "AndroidGDB.exe" was trying to access the internet. Something that had never been told before. By the way, I had already put the "ADB.exe" in the list of "exceptions" of AVG 2018.

Conclusion The new Antivirus with Firewall software seems to be more hostile with many applications than before, not even noticed.

------------------------------------------- END of ERROR message above -----------------------------

Well, now, a new clash begins between me and RAD Studio. NOW ONE NEW ERROR UNKNOW:

Now, after losing so much time with the above mentioned error, I come back to a new error that I was already trying with trying to create a test project for "Push Notification" messages.

Well before the above error, I was not able to understand where the error was with my project, since I had no code to promote the error that I will describe here.

Always after the application was sent to the smartphone and executed without any error, when closing it and returning to RAD Studio I had the following errors: (always in DEBUG mode)

first error showed:
---------------------
Debugger Exception Notification: Project "NovoPush.apk" raised exception class Segmentation fault (11).

And right after the second error screen:

second error showed:
---------------------
Debugger Exception Notification: Project "NovoPush.apk" raised exception class EAccessViolation with message 'Access violation at address 746F4E64, accessing address 746F4E64

And then Debug was terminated in RAD Studio.

Now, let's understand my side:

1) I do not have any source code typed in the project; LOOK ABOVE IN SOURCE CODE OR MY PROJECT
2) I have only 2 components that are linked by one of their properties (EMSProvider and PushEvetns, linked by the "Provider" property of component "PushEvents1")

Nothing else! No creation of any object is created or deleted manually, as there is no source code in the project.

There is only one form, which is the main form. Nothing else!

And now, what to do to understand this error! I've been trying to figure out where the error is in the project for 4 days.

If I compile in RELEASE mode, no error is shown.

If I set the variable "ReportMemoryLeaksOnShutdown: = True;" in DPR, no further information is displayed. Only the above two error messages.

So I'm sending the source project so someone can understand and explain where the error is. Which I do not think they will find either.

In order to create this "Push Notification" project, I have already installed the "30831_rad_studio_10.2.3_android_push_notification_patch 2017-March-27" patch in the RAD Studio XE10.2.3 Tokyo, as already explained in several videos I already saw on YouTube about subject matter.

*******************************

My screenshots:
https://image.ibb.co/iBZTfT/SKD_MANAGER_CONFIG.jpg
https://image.ibb.co/jLhQS8/Cant_Bind_Address_Address_Already_In_Use_Existing.png
https://image.ibb.co/dahTVT/Error1_...de_when_my_apps_is_ended_in_my_smartphone.png
https://image.ibb.co/cgT2qT/Error2_...de_when_my_apps_is_ended_in_my_smartphone.jpg
https://image.ibb.co/hKCOx8/My_Project_Definitions.png
https://image.ibb.co/gQRac8/Later_S..._But_AVG2018_Got_The_File_Android_GDB_EXE.png

I hope someone can lend a hand, thank you in advance.

hug
 

c1zone

Member
Joined
Jan 5, 2009
Messages
6
Reaction score
7
Age
51
I have try source code and compile run on my device ( Debug and Release mode) ... no error what so ever
 

c1zone

Member
Joined
Jan 5, 2009
Messages
6
Reaction score
7
Age
51
I run Tokyo 10.2.3 and also 30831_rad_studio_10.2.3_android_push_notification_patch 2017-March-27
 

emailx45

Premium
Joined
May 5, 2008
Messages
2,478
Reaction score
2,223
Location
here and there
yes, not error in app execution, but when go back to RAD my Debug screen show the error above.
But what this error existing if i dont have any code as: create any object or acessing any object (if I dont have any code)

Im crazy or the RAD is always crazy hehehe
 
Top