Commit Graph

34565 Commits

Author SHA1 Message Date
Manav Rathi
4e7dca6e4e [auth] Fix case insensitive rename
A recent PR seems to have added "Render.svg". I'm not sure of the intent, but
this seems to have been meant as replacement of the existing "render.svg" (note
the different case). Because of how the macOS APFS filesystem and git interact,
main is now showing as dirty on a git checkout.

Based on a visual comparison, and assuming the most recent PR is the meant to
intentionally update this file, I've retained "Render.svg".
2024-10-28 17:07:22 +05:30
github-actions[bot]
60aae73223 [mobile] New translations (#3869)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-10-28 15:55:14 +05:30
LeGenDaRy
a6e4f9e603 Add new icons (#3776)
Add new icons
2024-10-28 15:14:31 +05:30
Neeraj Gupta
bec0f639d6 [server] API to get file data status (#3868)
## Description
Note:
This API won't really return status/diff for deleted files. The clients
will primarily use this data to identify for which all files we already
have preview generated or it's ML inference is done.
This doesn't simulate perfect diff behaviour as we won't maintain a
tombstone entries for the deleted API.
## Tests
2024-10-28 15:14:09 +05:30
Neeraj Gupta
70f79ebae4 [server] Change method type 2024-10-28 15:12:24 +05:30
Neeraj Gupta
17d1589859 [server] API to get index diff status 2024-10-28 15:03:08 +05:30
github-actions[bot]
dcd112bfdf [mobile] New translations (#3862)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-10-28 10:29:11 +05:30
github-actions[bot]
d3ce42fca1 [auth] New translations (#3863)
New translations from
[Crowdin](https://crowdin.com/project/ente-authenticator-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-10-28 10:26:21 +05:30
KingLuc12
d7e10a5e7a [Custom Icons] Add Ubiquiti (#3825)
## Description
Added Ubiquiti to the custom icons.
2024-10-28 10:25:43 +05:30
Manav Rathi
b4467771c0 [web] Enable Ukrainian (#3865) 2024-10-28 10:10:03 +05:30
Manav Rathi
984800379e [web] Enable Ukrainian 2024-10-28 10:02:53 +05:30
Manav Rathi
24c6d52b54 [web] New translations (#3861)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-10-28 09:57:52 +05:30
Crowdin Bot
54787eaf8d New Crowdin translations by GitHub Action 2024-10-28 00:36:03 +00:00
Manav Rathi
85e6fb60dc [desktop] Fix OOM on large library imports (#3847)
It is hard for me to be certain, but I feel this should resolve the
sporadic OOMs that have been reported when uploading large libraries.

- https://github.com/ente-io/ente/issues/2500 
- https://github.com/ente-io/ente/discussions/3420

There are two fixes here:

1. First one is a inefficient array concat in our code. This was not
incorrect per se, but it did lead to an allocation pattern that caused
V8's GC to crash the renderer with OOMs.

2. But even after the first fix, I was able to sometimes reproduce OOMs.
I added a lot of instrumentation (I've cherry-committed some of it to
git history for future reference when debugging similar issues), but I
couldn't spot any abnormal allocation patterns during uploads. Out of
ideas, I started imagining it was a Chromium issue, and on a whim, I
updated Electron 30 => 33 (something I needed to do anyway, as part of
regular app dependency updates). That apparently has resolved the
remaining OOMs.

With these changes, I've not been able to reproduce a crash even after
bumping up the parallel upload count from 4 to 12. I've let the parallel
upload count be at the existing 4 for now, but if indeed we stop getting
field reports of OOM crashes after this is released, we can increase
that too in the future.
2024-10-26 15:33:09 +05:30
Manav Rathi
f5ad895768 Revert "Debugging instrumentation"
This reverts commit 6700f912fc (it was always meant to be reverted, and only a history entry)
2024-10-26 14:36:22 +05:30
Manav Rathi
158254a658 Update to Electron 33
Two reasons:

- Electron 30 is end of support

- The prev-to-prev commit didn't fix all OOMs
  (3511fcf723), and they still sporadically
  occur. But there isn't any any aberrant memory consumption I can spot (See
  prev commit for some example instrumentation, the app's memory usage doesn'
  exceed a few hundred MBs at any point). So to rule out an upstream issue.
2024-10-26 14:24:36 +05:30
Manav Rathi
6700f912fc Debugging instrumentation
commiting to keep them in history
2024-10-26 14:20:13 +05:30
Neeraj Gupta
a830026640 [server] Add '/' before query params for an album's share URL (#3843) 2024-10-26 13:58:44 +05:30
ashilkn
3b8c1ed9e3 [server] Add '/' before query params for an album's share URL 2024-10-26 07:51:20 +05:30
Prateek Sunal
e75913cb96 [auth] linux fixes (#3334)
## Description

- fix #2563 #2564
- update binary name

## Tests
2024-10-25 22:31:16 +05:30
Manav Rathi
3511fcf723 [desktop] Fix an OOM on large library imports
Should reduce the following occurrences (This should make it better, but there
might be other reasons for the OOM too): -
https://github.com/ente-io/ente/issues/2500 - -
https://github.com/ente-io/ente/discussions/3420

---

Here, the issue is that the combineChunksToFormUploadPart function, while not
incorrect, is terribly inefficent in how it combines Uint8Arrays byte by
byte. This apparently causes an allocation pattern that the V8 garbage
collector, Oilpan, doesn't like, and crashes the renderer process with:

    [main] <--- Last few GCs --->
    [main]
    [main] [17639:0x13000e90000]    39409 ms: Mark-Compact (reduce) 48.1 (57.8) -> 47.7 (52.8) MB, pooled: 0 MB, 35.08 / 0.04 ms  (average mu = 0.857, current mu = 0.906) CppHeap allocation failure; GC in old space requested
    [main]
    [main]
    [main] <--- JS stacktrace --->
    [main]
    [main] [17639:1025/145540.195043:ERROR:v8_initializer.cc(811)] V8 process OOM (Oilpan: Large allocation.).

The effort was primarily spent in getting it to a reproducible-ish state, and I
can now sporadically reproduce this watching a folder full of large videos, and
setting the network conditions in DevTools to 3G. For real users, what probably
happens is, depending on network speed, there is a potential race condition
where 4 multipart uploads may start within the same GC cycle (but I'm guessing
here, since the setup I have for reproducing this is still very sporadic).

Here is a smaller isolated example. This code, when repeatedly invoked in a
setTimeout (independent of any uploads or anything else in the app), causes the
renderer to OOM within a minute.

    import { wait } from "@/utils/promise";

    async function combineChunksToFormUploadPart() {
        const combinedChunks = [];
        for (let i = 0; i < 5 * 5; i++) {
            const { done, value: chunk } = await readDo();
            if (done) {
                break;
            }
            for (let index = 0; index < chunk.length; index++) {
                combinedChunks.push(chunk[index]!);
            }
        }
        return Uint8Array.from(combinedChunks);
    }

    const readDo = async () => {
        await wait(10);
        const ENCRYPTION_CHUNK_SIZE = 4 * 1024 * 1024;
        return {
            done: false,
            value: Uint8Array.from(
                Array(ENCRYPTION_CHUNK_SIZE).fill(Math.random()),
            ),
        };
    };

---

Some flags which helped in debugging:

    app.commandLine.appendSwitch("js-flags", "--expose_gc --trace_gc --trace_gc_verbose");
2024-10-25 20:49:03 +05:30
Manav Rathi
24009842d7 [docs] [web] Add NVM as an alternative (#3842) 2024-10-25 19:10:09 +05:30
Manav Rathi
1b6dda46df Add NVM as an alternative 2024-10-25 19:07:09 +05:30
Ashil
9956faf4b3 Update sha256 fingerprint of ente photos in Digital asset links JSON (#3841) 2024-10-25 17:38:19 +05:30
ashilkn
a829681970 Update sha256 fingerprint of ente photos in Digital asset links JSON 2024-10-25 17:34:03 +05:30
Neeraj Gupta
27dd13324e ML Lite (#3838)
## Description

- Adds an option to not index files locally on mobile
- Uses the global ML flag for consent

## Tests

Tested in debug mode on my Pixel 8.
2024-10-25 11:18:36 +05:30
laurenspriem
0a2090e2fb [mob][photos] Rename keys 2024-10-25 11:15:19 +05:30
laurenspriem
656baa972d [mob][photos] Simplify 2024-10-25 10:39:51 +05:30
laurenspriem
ab4d73e172 [mob][photos] Fix 2024-10-25 10:35:53 +05:30
laurenspriem
f81c7f6faa [mob][photos] Refactor 2024-10-25 10:23:35 +05:30
Manav Rathi
37d763bfcd [infra] Add some notes on creating a graphical cloud VM (#3830) 2024-10-24 20:22:42 +05:30
Manav Rathi
3c8b023cd0 Tweak 2024-10-24 20:20:03 +05:30
laurenspriem
8bf29ee82f [mob][photos] Fix remote fetch counter 2024-10-24 19:46:42 +05:30
laurenspriem
b85e830a2b [mob][photos] Remove unneeded 2024-10-24 19:33:57 +05:30
laurenspriem
9e1d32fd88 [mob][photos] Fix colors 2024-10-24 19:28:25 +05:30
laurenspriem
4c63ffa90f [mob][photos] Inherited widget fix 2024-10-24 19:21:53 +05:30
laurenspriem
d16566ec31 [mob][photos] format 2024-10-24 19:07:25 +05:30
laurenspriem
d2f20140da [mob][photos] format 2024-10-24 19:02:13 +05:30
laurenspriem
054a9deb59 [mob][photos] Only index locally if enough RAM 2024-10-24 19:00:22 +05:30
laurenspriem
e500ef2144 [mob][photos] Extract strings 2024-10-24 17:56:41 +05:30
laurenspriem
602e820442 [mob][photos] Fix ML consent logic 2024-10-24 17:51:24 +05:30
laurenspriem
811ba9abfa [mob][photos] Prettier UI 2024-10-24 17:34:25 +05:30
laurenspriem
ca900d5a9a [mob][photos] Update ML debug options 2024-10-24 17:19:42 +05:30
laurenspriem
e969f8fa33 [mob][photos] Format 2024-10-24 17:10:35 +05:30
laurenspriem
39182fa9a4 [mob][photos] Enable local indexing by default 2024-10-24 17:09:11 +05:30
laurenspriem
1bf6b56f96 [mob][photos] Switch ML flags 2024-10-24 17:06:33 +05:30
Manav Rathi
18927c9e1c Notes on install
Ref: https://timoanttila.com/blog/install-xfce-to-hetzner-cloud
2024-10-24 16:55:10 +05:30
Saijo George
67c9d8b413 Update custom-icons.json for impact.com (#3820)
## Description

## Tests
2024-10-24 14:41:07 +05:30
laurenspriem
ee59fe8dcd [mob][photos] Toggle for local indexing 2024-10-24 14:29:39 +05:30
Neeraj Gupta
70b90e8123 [mob] Bump version v0.9.53 (#3829)
## Description

## Tests
photos-v0.9.53
2024-10-24 12:14:42 +05:30