Nightelf9
Explore posts from serversIImmich
•Created by Nightelf9 on 3/19/2025 in #help-desk-support
iOS app: Error while getting remote assets and FlutterError - Catch all
Hello! I’m getting errors in the iOS app but the web app is working perfectly.
Photos I take get uploaded to the server (and is visible in the web app) but in the iOS app the cloud icon in the app has a line through it. Also when I take a photo it takes a while before it shows in the iOS app but it’s already uploaded to the web app.
Also all my photos aren’t showing the iOS app. I’ve tried logging in and out. Restarting the server. Tried the host name url and the local ip url in the iOS app.
Running Immich via docker on truenas scale.
iOSlog
Error while getting remote assets
ApiException 400: HTTP connection failed: POST /sync/full-sync (Inner exception: ClientException: Bad file descriptor, uri=http://192.168.68.122:30041/api/sync/full-sync)
#0 IOClient.send (package:http/src/io_client.dart:156)
<asynchronous suspension>
#1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93)
<asynchronous suspension>
#2 ApiClient.invokeAPI (package:openapi/api_client.dart:96)
<asynchronous suspension>
#3 SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:138)
<asynchronous suspension>
#4 AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:150)
<asynchronous suspension>
#5 SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:267)
<asynchronous suspension>
#6 SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:257)
<asynchronous suspension>
#7 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/services/sync.service.dart:92)
<asynchronous suspension>
#8 AsyncMutex.run.<anonymous closure> (package:immich_mobile/utils/async_mutex.dart:15)
<asynchronous suspension>
Library: image resource service
Context: Instance of 'ErrorDescription'
25 replies
CDCloudflare Developers
•Created by Nightelf9 on 3/2/2024 in #pages-help
how to query DB from frontend using pages and D1
I've successfully been able to GET pre defined static data from my D1 database (by using the generic js code) but I'm not able to query the DB by sending a search string into the js DB function code. here are my 2 js codes
javascript.js
async function searchCustomers() {
const companyNameInput = document.getElementById('companyNameInput').value;
console.log('Input value:', companyNameInput); // Log the input value to the console
const response = await fetch('getDB', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ companyName: companyNameInput }),
});
const data = await response.json();
// Handle the data or update the resultsContainer as needed
document.getElementById('resultsContainer').innerHTML = JSON.stringify(data);
}
async function fetchData() {
try {
const response = await fetch('DB', {
method: 'GET',
headers: {
'Accept': 'application/json'
}
});
const result = await response.json();
console.log(result);
} catch (error) {
console.error('Error fetching data:', error.message);
}
}
// Call fetchData to initiate the process
fetchData();
getDB.js
export async function onRequest(context, request) {
const companyName = request.json.companyName;
console.log('Received companyName:', companyName); // Log the companyName to the console
const ps = context.env.DB.prepare(
SELECT CompanyName FROM Customers WHERE CompanyName = ?
);
const data = await ps.all(companyName);
return new Response.json(data);
}
the companyName search term doesn't get into the getDB.js function - it says internal error 500
fyi, I'm a novice at cloudflare and coding in general any help will be greatly appreciated 😄2 replies