Skip to content

Commit f7b0ec6

Browse files
authored
Merge branch 'master' into anna/master
2 parents a05fb36 + 77308b2 commit f7b0ec6

File tree

25 files changed

+1913
-963
lines changed

25 files changed

+1913
-963
lines changed

CHANGELOG.md

+39-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
## Version 24.05.XX
2+
Fixes:
3+
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
4+
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition
5+
6+
Dependencies:
7+
- Bump countly-sdk-nodejs from 22.6.0 to 24.10.0
8+
- Bump countly-sdk-web from 24.4.1 to 24.11.0
9+
- Bump form-data from 4.0.0 to 4.0.1
10+
- Bump jimp from 0.22.12 to 1.6.0
11+
- Bump jsdoc from 4.0.3 to 4.0.4
12+
- Bump nodemailer from 6.9.15 to 6.9.16
13+
- Bump puppeteer from 23.8.0 to 23.9.0
14+
- Bump tslib from 2.7.0 to 2.8.1
15+
16+
## Version 24.05.19
17+
Fixes:
18+
- [dashboards] Fixing issue where dashboard widgets go into single column
19+
20+
Security:
21+
- Bump puppeteer from 17.1.3 to 23.8.0
22+
- Bump express from 4.21.0 to 4.21.1
23+
- Bump sass from 1.79.4 to 1.81.0
24+
- Bump express-session from 1.18.0 to 1.18.1
25+
- Bump cross-spawn from 7.0.3 to 7.0.6 in /ui-tests
26+
- Bump cross-spawn from 7.0.3 to 7.0.6 in /plugins/hooks
27+
28+
## Version 24.05.18
29+
Fixes:
30+
- [core] Fixed bug where changing passwords results in the loss of the "Global Admin" role
31+
- [core] Fixed bug where exporting incoming data logs could result in "Incorrect parameter \"data\" error
32+
- [crash] Fixed bug in crash ingestion for scenarios where the "app version" is not a string.
33+
- [script] Fixing bug with "delete_old_members" script that led to malformed requests
34+
35+
Enterprise fixes:
36+
- [nps] Fixed bug that showed the wrong nps preview title
37+
138
## Version 24.05.17
239
Fixes:
340
- [push] Improved ability to observe push related errors
@@ -34,6 +71,7 @@ Security:
3471

3572
## Version 24.05.15
3673
Enterprise fixes:
74+
- [ab-testing] Fixed JSON.parse issue preventing creation of AB tests
3775
- [nps] Fixed UI issues in the widget editor related to the "user consent" section
3876
- [ratings] Fixed rendering issue for escaped values
3977

@@ -68,7 +106,7 @@ Enterprise Features:
68106
## Version 24.05.12
69107
Fixes:
70108
- [dashboards] Fixes for dashboards grid
71-
- [dasboards] UI fix for dashboard widget action menu
109+
- [dashboards] UI fix for dashboard widget action menu
72110
- [push] Refactored fcm API related code
73111
- [reports] Use config for encryption key in reports
74112

Dockerfile-api

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ ENV COUNTLY_CONTAINER="api" \
1717
COUNTLY_CONFIG_API_API_WORKERS="1" \
1818
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
1919
NODE_OPTIONS="--max-old-space-size=2048" \
20-
TINI_VERSION="0.18.0"
21-
20+
TINI_VERSION="0.18.0"\
21+
PUPPETEER_CACHE_DIR=/opt/countly/.cache/puppeteer
22+
2223
WORKDIR /opt/countly
2324
COPY . .
2425

@@ -58,7 +59,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
5859
# cleanup & chown
5960
npm remove -y --no-save mocha nyc should supertest && \
6061
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
61-
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
62+
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
6263
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
6364
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
6465
\
@@ -75,4 +76,4 @@ USER 1001:0
7576

7677
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
7778

78-
CMD ["/opt/countly/bin/docker/cmd.sh"]
79+
CMD ["/opt/countly/bin/docker/cmd.sh"]

api/parts/mgmt/apps.js

+8-15
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ appsApi.getAppsDetails = function(params) {
170170
* @param {params} params - params object with args to create app
171171
* @return {object} return promise object;
172172
**/
173-
const iconUpload = function(params) {
173+
const iconUpload = async function(params) {
174174
const appId = params.app_id || common.sanitizeFilename(params.qstring.args.app_id);
175175
if (params.files && params.files.app_image) {
176176
const tmp_path = params.files.app_image.path,
@@ -183,25 +183,18 @@ const iconUpload = function(params) {
183183
return Promise.reject();
184184
}
185185
try {
186-
return jimp.read(tmp_path, function(err, icon) {
187-
if (err) {
188-
log.e(err, err.stack);
189-
fs.unlink(tmp_path, function() {});
190-
return true;
186+
const icon = await jimp.Jimp.read(tmp_path);
187+
const buffer = await icon.cover({h: 72, w: 72}).getBuffer(jimp.JimpMime.png);
188+
countlyFs.saveData("appimages", target_path, buffer, {id: appId + ".png", writeMode: "overwrite"}, function(err3) {
189+
if (err3) {
190+
log.e(err3, err3.stack);
191191
}
192-
icon.cover(72, 72).getBuffer(jimp.MIME_PNG, function(err2, buffer) {
193-
countlyFs.saveData("appimages", target_path, buffer, {id: appId + ".png", writeMode: "overwrite"}, function(err3) {
194-
if (err3) {
195-
log.e(err3, err3.stack);
196-
}
197-
fs.unlink(tmp_path, function() {});
198-
});
199-
});
200192
});
201193
}
202194
catch (e) {
203-
log.e(e.stack);
195+
console.log("Problem uploading app icon", e);
204196
}
197+
fs.unlink(tmp_path, function() {});
205198
}
206199
};
207200

api/utils/render.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ exports.renderView = function(options, cb) {
6262

6363
var settings = {
6464
headless: true,
65+
env: {
66+
//https://github.com/hardkoded/puppeteer-sharp/issues/2633
67+
XDG_CONFIG_HOME: pathModule.resolve(__dirname, "../../.cache/chrome/tmp/.chromium"),
68+
XDG_CACHE_HOME: pathModule.resolve(__dirname, "../../.cache/chrome/tmp/.chromium")
69+
},
6570
args: ['--no-sandbox', '--disable-setuid-sandbox'],
6671
ignoreHTTPSErrors: true,
6772
userDataDir: pathModule.resolve(__dirname, "../../dump/chrome")
@@ -118,8 +123,11 @@ exports.renderView = function(options, cb) {
118123
};
119124

120125
page.setDefaultNavigationTimeout(updatedTimeout);
121-
122-
await page.goto(host + '/login/token/' + token + '?ssr=true');
126+
const resp = await page.goto(host + '/login/token/' + token + '?ssr=true');
127+
const status = resp?.status();
128+
if (status !== 200) {
129+
throw new Error(`Failed to open login page. Status: ${status}`);
130+
}
123131

124132
await page.waitForSelector('countly', {timeout: updatedTimeout});
125133

bin/countly.install_rhel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ else
5555
fi
5656

5757
#Install dependancies required by the puppeteer
58-
sudo dnf install -y alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXrandr.x86_64 GConf2.x86_64 libXScrnSaver.x86_64 libXtst.x86_64 pango.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-cyrillic xorg-x11-fonts-misc xorg-x11-fonts-Type1 xorg-x11-utils
58+
sudo dnf install -y alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXrandr.x86_64 GConf2.x86_64 libXScrnSaver.x86_64 libXtst.x86_64 pango.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-cyrillic xorg-x11-fonts-misc xorg-x11-fonts-Type1 xorg-x11-utils libdrm libgbm at-spi2-atk libxkbcommon
5959
#Install nss after installing above dependencies
6060
sudo dnf update -y nss
6161

0 commit comments

Comments
 (0)