Hello
following twice
SocketException: Bad file descriptor (OS Error: Bad file descriptor, errno = 9), address = ssq.eu.amity.co, port = 49688
SocketException: Bad file descriptor (OS Error: Bad file descriptor, errno = 9), address = ssq.eu.amity.co, port = 49564
Setup
amity_sdk: 0.26.0
iOS 16.6
iPhone 14 Pro Max
flutter: 3.13.0
xcode: latest
Hello, can we verify that you’ve been experiencing this exception since SDK version 0.23.0, but it wasn’t causing crashes at that time? However, with the current version, 0.26.0, it’s leading to crashes in your application. How frequently does the crash occur? Is it intermittent or does it happen consistently when performing a specific action?
Is this crash related to the crash you mention here: Activity on background ?
Hello
I’m working with the latest versions of plugins and I think (not sure) we have the crash more than 2weeks.
It’s happened randomly after moving the App to background. The App on foreground doing nothing, move to background and the crash could be immediately or some seconds or minutes after.
About
activity-on-background
I think it’s the same problem
Thanks
Kobi
Thank you @meridork let us check on this again and will get back to you
@meridork Could you please help check these questions below:
- What function is being called to produce this log?. For ex., login(), getUser(), getMessages()
- Could you provide how the SDK is currently being setup? Actual code in your project (in this area ASC Sample Code )
This is for the exception issue, for the crash, we will further investigate it.
You can send to our support email: support.asc@amity.co
Hello, thank you for your patience, we have a few questions from our team:
- Is AmiltyCoreClient being setup every time application is being started?
- Is login method being called every time after the setup of AmityCoreClient?
- Is all the other methods are being used in this sequence, could you please provide those function names please? Not the lib.
- Is AmiltyCoreClient being setup every time application is being started? Yes
- Is login method being called every time after the setup of AmityCoreClient? Yes
- Is all the other methods are being used in this sequence, could you please provide those function names please? Not the lib.
All functions that working with Amity in the Lib. I’m display the Feed and creating Posts and comments
This exception in only in iPhone, Android working OK
iOS as some limitations on working on background. Maybe its relevant to the exception?
Kobi
1 Like
Hello, may I ask how did you make the iOS build? as you mentioned in another topic that you don’t have the mac to work with iphone? We have some Xcode settings we need you to look into. Is it something you can help with?
Hello,
What type of setting?
I build the version using CodeMagic - Codemagic - CI/CD for Android, iOS, Flutter and React Native projects
All The code in GitHub and CodeMagic get the code directly from GitHub.
I’m developing on my laptop using Android Studio and push all the project , including iOS, to GitHub.
I can make changes in iOS Lib
Kobi
Could you please try adding this highlighted code to the info.plist
→ ios → runner → info.plist
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
I have It in info.plist
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>processing</string>
<string>remote-notification</string>
</array>
1 Like
Could you check this for us:
If these option are enabled in ios project. Can be checked in Xcode.
Can you please help share dependencies in pubspec.yaml file and the environment block as well?
hello, I will verify Xcode definitions
environment block
environment:
sdk: ">3.0.0 <4.0.0"
dependencies
dependencies:
provider: ^6.0.2
flutter_svg: ^2.0.6 #^2.0.4
firebase_storage: ^11.2.2 #^10.0.2
amity_sdk: 0.26.0
app_settings: 4.3.0 ### 4.1.6
auto_route: 5.0.4
auto_size_text: ^3.0.0
background_fetch: 1.1.6
cached_network_image: ^3.2.0
camera: ^0.10.5+2
carousel_slider: ^4.0.0
chewie: ^1.5.0
cloud_firestore: ^4.8.0 #^3.1.14
contacts_service: ^0.6.3
dartz: ^0.10.1
device_info_plus: ^9.0.2
dio: ^5.3.0
http: ^0.13.4
dotted_border: ^2.0.0+2
easy_localization: ^3.0.2
ffmpeg_kit_flutter: ^6.0.0
file_picker:
firebase_auth: ^4.6.2 #^3.3.15
firebase_auth_web: ^5.5.2
firebase_core: ^2.13.1 #^1.15.0
flutter_image_compress: ^2.0.3
firebase_messaging: ^14.6.2 #^11.3.0
flutter:
sdk: flutter
flutter_exit_app: ^1.1.2
flutter_facebook_auth: ^5.0.7 ###^4.0.1 5.0.8 flutter_secure_storage ^8.0.0
flutter_file_downloader: ^1.1.2
flutter_hooks: ^0.18.6
flutter_linkify: ^6.0.0
flutter_login: ^4.2.0
full_screen_image: ^2.0.0
flutter_screenutil: ^5.8.2
flutter_secure_storage: ^8.0.0
freezed_annotation: ^2.2.0
geocoding: ^2.1.0
geolocator: ^10.0.0
google_fonts: ^4.0.3 ###2.3.1 translator 0.1.7
google_sign_in: ^6.0.2
hooks_riverpod: ^2.3.2
horizontal_picker: ^1.2.0
image_cropper: ^4.0.1 ###2.0.0 ##translator 0.1.7
image_picker: ^0.8.7+4 ##translator 0.1.7
intl: ^0.18.0 ### waiting to flutter_localizations 0.18.0
intl_phone_field: ^3.1.0
like_button: ^2.0.4
lottie: ^2.3.0 ###1.3.0
map_launcher: ^2.5.0+1
multi_select_flutter: ^4.1.2
package_info_plus: ^4.0.2
path_provider: ^2.0.13
permission_handler: ^10.2.0 ###9.2.0
photo_view: ^0.14.0 ###0.13.0
pin_code_fields: ^7.4.0 # based on translator 0.1.7
pull_to_refresh: ^2.0.0
screenshot: ^2.1.0
shared_preferences: ^2.1.1
string_validator: ^1.0.0
url_launcher: ^6.1.10
uuid: ^3.0.6 # amity_sdk 0.26.0
video_compress: ^3.1.0
video_player: ^2.6.1 ###2.4.2
video_thumbnail: ^0.5.0
visibility_detector: ^0.3.3 #auto_animated: ^3.0.1
webview_flutter: 4.2.1
auto_animated: ^3.0.1
auto_size_text_field: ^2.2.1
flutter_local_notifications: ^15.0.1 ###12.0.4 #^9.8.0+1
overlay_support: ^2.0.1
1 Like
Hello,
I had a crash on my iPhone and at the same time exception
SocketException: Bad file descriptor (OS Error: Bad file descriptor, errno = 9), address = ssq.eu.amity.co, port = 49781
The same exception again while App was in background
Exception
SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = ssq.eu.amity.co, port = 49945
Stack
#0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1244)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2002)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1327)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1089)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1035)<asynchronous suspension>
App in Front I have following exceptions when locking and opening the screen
I can generate the exception easyly
Excelption 1 The App don’t crash
SocketException: Bad file descriptor (OS Error: Bad file descriptor, errno = 9), address = ssq.eu.amity.co, port = 50282
Exception 2
`SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = ssq.eu.amity.co, port = 50237
Stack
#0 _NativeSocket.write (dart:io-patch/socket_patch.dart:1244)
#1 _RawSocket.write (dart:io-patch/socket_patch.dart:2002)
#2 _ExternalBuffer.readToSocket (dart:io/secure_socket.dart:1327)
#3 _RawSecureSocket._writeSocket (dart:io/secure_socket.dart:1089)
#4 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1035)`
Exception 3 I think the App crashing
[firebase_messaging/apns-token-not-set] APNS token has not been set yet. Please ensure the APNS token is available by calling
getAPNSToken(). **Stack**
#0 MethodChannelFirebaseMessaging._APNSTokenCheck (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:138)<asynchronous suspension>
#1 MethodChannelFirebaseMessaging.subscribeToTopic (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:390)<asynchronous suspension>
It matches the settings that in my system
1 Like
Thank you for sharing this valuable information. We are currently conducting an investigation and will keep you updated with our findings.