Commit graph

3215 commits

Author SHA1 Message Date
Scott Nonnenberg
9ef8228ff8
Update electron-builder to latest, with .ico fix (#1976) 2018-01-17 15:27:18 -08:00
Scott Nonnenberg
743e897541
Left pane: small sorting fix, logging for error cases (#1969) 2018-01-12 16:22:00 -08:00
Scott Nonnenberg
ce01eb7913
Log more info w/http errors, resilient to invalid group members (#1968)
* api.js: HttpError now preserves more of original error info

* Allow invalid conversation to be added to ConversationController

If a number we don't believe is valid comes in as part of a group, we
fall apart. We event prevent display of that conversation. Because we
have 'isValid()' protections in place for the places we create contacts
from user input in desktop (the search bar), we can temporarily add an
invalid contact to our collection (not saving it to the database) to
unblock this group scenario.

Still investigating what kind of phone number is valid in a mobile app
but not valid for us.

* Finish the debuggable error support

* Fix logging in the case of an invalid number
2018-01-12 16:19:26 -08:00
Scott Nonnenberg
177dfb3220
Dependency updates, fixes required for successful release (#1966)
* A number of fixes required for successful build after upgrades

- extract now takes an absolute directory only
- something changed, so we now need to force NODE_ENV=production; we use
  electron-is-dev for this
- electron-builder, electron-publisher-s3, and electron-updater are now
  updated to their latest available versions

* Add direct dependency on extract-zip, since we use it directly

* Load 'config' module after we've modified NODE_ENV

* Downgrade electron-builder due to bug, downgrade icon-maker too

The latest electron-builder came with a fix for one of our bugs as well
as a new bug that blocks builds on Windows: https://github.com/electron-userland/electron-builder/issues/2462

There's no good reason to upgrade icon-maker. And a good reason to keep at the version on github: https://github.com/jaretburkett/electron-icon-maker/issues/7
2018-01-12 16:14:45 -08:00
Scott Nonnenberg
d81943cf20
v1.2.0-beta.1
Update to Electron 1.7.10 (#1919)

Fix issue where clicking Windows notification breaks window out of
aero-snap location (#1918)

Fix issue where old log data would persist in logs dir (#1945)

Fix issue where disabled send field (in the middle of send) could be
edited after click (#1937)

Update strings (#1921)

Dev:
  - Fix error to console when verifying contact in standalone mode
    (#1961)
  - Remove all built assets from repo (#1955)
  - Log out information from DOMException when import fails (#1923)
  - Log clearer messages regarding prekey/signed prekey fetches (#1961)
  - Make errors more debuggable; capture correct stack, include name
    (#1944)
  - Add eslint/mocha with code coverage for non-browser code (#1945)
  - Revamped github issue and pull request templates, updates to
    contributing.md/readme.md (#1955 and #1956)
  - Document building/testing releases in Contributing.md,
    thanks @veggiedefender (#1867)
  - Update a number of dependencies to the latest: builder, websocket,
    spellcheck (#1920)
2018-01-10 18:17:09 -08:00
Scott Nonnenberg
bbab4bba10
Fix device ID check, clean up prekey fetch logging (#1961)
* DeviceId is a string, so we use the less-strict comparison

* Clean up prekey fetch logging
2018-01-10 18:12:24 -08:00
Scott Nonnenberg
9b2e2a4605
Readme: big install, Contributing: mention Next Steps project (#1956) 2018-01-10 17:47:22 -08:00
Scott Nonnenberg
d503d1ace3
Remove built assets from repo, updates to docs + GH templates (#1955)
* Revamp issue and pull request templates, other docs tweaks

`yarn test` now runs all of our tests.

* Remove generated files from the repository

* Update to new Signal support URL

* Prevent the 'Test failed 2 == 1' from test-release in CI

* Another attempt to fix grunt test-release on Appveyor

* grunt test-release: Fail build if test fails

* Lint fix, and move jshint earlier in CI process
2018-01-09 15:31:23 -08:00
Jesse Li
752ef40d47
Document building/testing releases in Contributing.md (#1867)
* Document building/testing releases

* move instructions for testing releases to bottom
2018-01-08 13:56:30 -08:00
Scott Nonnenberg
64fe9dbfb2
Clean logs on start - and eslint/mocha with code coverage (#1945)
* Clean logs on startup; install server-side testing/linting

* Add eslint config, make all of app/ conform to its demands

* Add Node.js testing and linting to CI

* Lock project to Node.js 7.9.0, used by Electron 1.7.10

* New eslint error: trailing commas in function argumensts

Node 7.9.0 doesn't like trailing commas, but Electron does

* Move electron to devDependency, tell eslint it's built-in
2018-01-08 13:19:25 -08:00
Scott Nonnenberg
6464d0a5fa
Make errors more debuggable; capture correct stack, include name (#1944)
No more errors like this in the logs!

```
INFO  2018-01-05T18:33:15.942Z Message.saveErrors: null Error
    at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:30:33
    at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:138:3
    at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:40718:3
```

It has no information in the title, and then the callstack points to
the `new Error()` line in the old `errors.js`.

This change will include the actual error name and message details in
the stack, and will include the original http error stack as well if
provided.
2018-01-08 11:08:25 -08:00
Scott Nonnenberg
94a8c7e524
Update a number of dependencies to the latest: builder, websocket, spellcheck (#1920)
* Update builder to the latest

* Upgrade a number of dependencies
2018-01-08 10:48:15 -08:00
Scott Nonnenberg
e999473f19
Preserve disabled state in the middle of sending message (#1937)
* Preserve disabled state in send-message field on click

Also: get consistent in treatment of 'disabled' property.

* Add some comments explaining how audio recording dismissal works
2018-01-04 16:51:00 -08:00
Scott Nonnenberg
98d3a5e607
Update strings for just about all supported languages (#1921) 2018-01-04 16:28:53 -08:00
Scott Nonnenberg
66aa76e501
Log out information from DOMException when import fails (#1923)
This should give us the information we're looking for when imports fail
mysteriously!

https://developer.mozilla.org/en-US/docs/Web/API/DOMException
2018-01-04 16:26:41 -08:00
Scott Nonnenberg
8fd0adc486
Update to Electron 1.7.10 (#1919) 2018-01-04 16:20:41 -08:00
Scott Nonnenberg
deb9bab086
Remove duplicate showWindow method (#1918) 2018-01-03 18:18:13 -08:00
Scott Nonnenberg
2bd27941c0
v1.1.0
Note: This release is the same thing as https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v1.1.0-beta.6

Listed below are the changes from the previous production release: https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v1.0.41

Update to electron 1.7.9 (#1736)

Support the latest phone number formats via libphonenumber update (#1899)

Reduce download size by ~25MB over the previous production build (#1869)

Emoji - thanks @liliakai:
  - Emoji picker (#1608)
  - Add support for Emoji 5 (#1797)

Notifications:
  - Windows 7: Use an alternate mechanism for notifications (#1812)
  - Prevent drawAttention() when notifications are turned off - thanks @canerelci! (#1612)

Linux:
  - Support for current (artful) and previous (xenial) ubuntu versions (#1856)
  - Fix missing application icon on some Linux distributions (#1735)
  - Fix issue where window would not show new message alerts on some Linux systems - thanks @cornerman (#1820)
  - Add .deb specific dependencies - thanks @veggiedefender (#1858)

The default button is now 'later', not 'restart' in the 'update available' dialog (#1894)

Make the window minimum width a little smaller - thanks @emptyflask (#1863)

Intl-friendly sort order for contact lists (#1900)

Fix issue where update would restore deleted windows shortcut (#1804)

Fix issue where .tif file attachments could not be sent or received (#1901)

(in testing) Add a tray icon to the application behind command-line argument - thanks @m-pilia (#1676)
  --use-tray-icon enables the tray icon
  --start-in-tray enables the tray icon and the application starts minimized in the tray bar

(in testing) Support pass-through proxies with HTTPS_PROXY environment variable (#1878)

Dev:
  - Display of environment and app instance in title bar/about window (#1606)
  - Support for beta releases installed beside production versions (#1606)
  - Fix json parsing exceptions obscuring server errors (#1605)
  - Be resilient to thrown non-errors in import process (#1737)
2017-12-20 10:47:21 -08:00
Scott Nonnenberg
72971a365f
manifest.css catch-up 2017-12-19 17:19:21 -08:00
Scott Nonnenberg
14ec36f208
Promote v1.1.0-beta.6 to production 2017-12-19 16:50:56 -08:00
Scott Nonnenberg
250bd955a6
v1.1.0-beta.6
Fix issue where .tif file attachments could not be sent or received
(#1901)

Support the latest phone number formats via libphonenumber update
(#1899)

Intl-friendly sort order for contact lists (#1900)

Show window if hidden to tray when second instance attempts to start
(#1897)

Make the window minimum width a little smaller - thanks @emptyflask
(#1863)

Fix issue where duplicate emoji were listed in the emoji panel (#1893)

The default button is now 'later', not 'restart' in the
'update available' dialog (#1894)

Dev:
  - Add .deb specific dependencies - thanks @veggiedefender (#1858)
2017-12-14 17:47:41 -08:00
Scott Nonnenberg
7781f8fa5b
Treat tiffs like unrecognized files; Chrome doesn't render them (#1901) 2017-12-14 17:32:58 -08:00
Scott Nonnenberg
5caee59921
Support the latest phone number formats via libphonenumber (#1899)
* Update to the latest google-libphonenumber

* Update package.json to the format uses when updating it
2017-12-14 16:30:24 -08:00
Scott Nonnenberg
f0aaa7a1c5
Introduce intl-friendly sort order for contact lists (#1900) 2017-12-14 16:30:11 -08:00
Scott Nonnenberg
5cf320e429
Show window if hidden when second instance attempts to start (#1897) 2017-12-14 12:27:52 -08:00
Jesse Li
8a919efbe9 Add .deb specific dependencies (#1858)
Some barebones debian-based systems (e.g. Docker containers) don't come with the libasound2 and libxss1 libraries, which electron-builder does not include by default.
2017-12-14 11:32:04 -08:00
Jon Roberts
bc399c6777 a slightly more reasonable min-width (#1863) 2017-12-14 11:31:07 -08:00
Scott Nonnenberg
18ee8a3557
Remove obsolete emoji via a new fork of emoji-panel (#1893)
In many cases this removes generic emoji in favor of new gendered
options (one of which was a copy of the previous generic emoji anyway).
2017-12-14 11:30:41 -08:00
Scott Nonnenberg
5c5fdaaed5
Update available dialog: default now 'later', not 'restart' (#1894)
This prevents the user from restarting the app by pressing space on
MacOS,  which happens frequently during the course of normal typing of a
message.

In the future we'll move to a less-obtrusive system a little
more like Chrome, where you choose to do the restart when it is
convenient for you. For now, we minimize the chance of accidental
restart in the middle of typing a message.
2017-12-14 11:30:14 -08:00
Scott Nonnenberg
6f2260d08c
v1.1.0-beta.5
Support pass-through proxies with HTTPS_PROXY env var (#1878)
2017-12-08 16:26:35 -08:00
Scott Nonnenberg
b17a67ec65
Support pass-through proxies with HTTPS_PROXY env var (#1878)
We've simplified; HTTPS_PROXY or https_proxy is used for all requests.

We also require that only our self-signed certificates are used for
secure traffic. That rules out all SSL-terminating MITM proxies, since
we don't trust their root certificate.

Once we're sure that this system works for people, we'll improve config
on MacOS and Windows.
2017-12-08 10:38:01 -08:00
Scott Nonnenberg
4f487d208d
v1.1.0-beta.4
Reduce download size by ~125MB versus the previous beta build, about
~25MB over the previous production build (#1869)

Dev:
  - Update to v1.0.41 equivalence
  (5bc70c35e7)
  - This update to match production includes update fixes for OSX.
  Note: The transition v1.1.0-beta.3->v1.1.0-beta.4 will still have
  upgrade difficulties. When v1.1.0-beta.4 updates to the next release
  version, the behavior will be fixed.
2017-12-06 14:28:57 -08:00
Scott Nonnenberg
2a56c53fda
Merge branch 'master' into development 2017-12-06 14:28:10 -08:00
Scott Nonnenberg
00852cb828
v1.0.41
Fix issue where 'upgrade to new version' dialog would not restart app on
OSX (#1866)

Note: The transition v1.0.40->v1.0.41 will still exhibit this problem.
When v1.0.41 updates to the next release version, the behavior will be
fixed.
2017-12-06 14:25:42 -08:00
Scott Nonnenberg
53d7761e43
Merge branch 'master' into development 2017-12-06 12:45:26 -08:00
Scott Nonnenberg
e96502ba5e
Delay our call to quitAndInstall(); doesn't work inside callback (#1866) 2017-12-06 12:44:23 -08:00
Scott Nonnenberg
5bc70c35e7
Fix ASAR filter: takes ASAR size down by ~200MB (#1869)
I knew the emoji stuff was huge, just didn't realize that our filtering
for the ASAR was broken so none of our rules applied!
2017-12-06 12:44:16 -08:00
Scott Nonnenberg
b366de7c63
aptly.sh: Fix broken switch commands - distro and config fix 2017-12-04 18:51:38 -08:00
Scott Nonnenberg
74d80fb1db
v1.1.0-beta.3
Add proxy support based on environment variables (#1855)

Fix issue where window would not show new message alerts on some Linux
systesm - thanks @cornerman (#1820)

Add a tray icon to the application behind command-line argument -
thanks @m-pilia (#1676)

Emoji:
  - Fix issue where clicks in emoji panel wouldn't do anything (#1849)
  - Add support for Emoji 5 - thanks @liliakai (#1797)
  - Eliminate unused emoji images from production package (#1849)

Deployment:
  - aptly.sh: support for current and previous ubuntu versions (#1856)
  - deployment: update electron-publisher-s3 to match builder update
  (17f0bb42bc)

Dev:
  - Update development branch to include everything up to v1.0.40
  (f013eed9d1
  and 3ac29a4ba3)
  - Update readme.md to use signal.org URLs - thanks @scienmind (#1814)
2017-12-04 17:27:01 -08:00
Scott Nonnenberg
3ac29a4ba3
Fix merge confilict in rotate_signed_prekey_listener.js 2017-12-04 16:49:43 -08:00
Scott Nonnenberg
f013eed9d1
Merge branch 'master' into development
Bringing beta up to date with production v1.0.40
2017-12-04 16:08:19 -08:00
Scott Nonnenberg
1432d9853b
v1.0.40
Fix bug where previously-deleted contacts are re-added to left pane on
contact import (#1811)

Fix bug where the main window would be created off-screen, inaccessible
(#1830)

Fix issue where certain sync messages to iOS would result in a new
message alert (#1843 and #1857))

Key rotation updates (#1833 and #1846):
  - Save prekeys optimistically after generation, even if upload appears
    to fail
  - Track confirmations from server in prekey
  - New prekey cleanup behavior: favoring confirmed keys, but always
    keeping three
  - Log all failures resulting from signed prekey rotation
  - Retry rotation if we run into a failure
  - Force rotation when starting up new version, to fix Chrome
    interference (https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v0.44.13)

Dev:
  - Verify that saved window location/size data is valid before creating
    window (#1830)
  - A variety of logging improvements to help track down bugs (#1832 and
    #1836)
2017-12-04 15:54:56 -08:00
Scott Nonnenberg
acc94edd23
Add proxy support based on environment variables (#1855)
We pull proxy settings from environment variables:

- HTTPS_PROXY for sending, profile pulls, and attachment download/upload
- WSS_PROXY for connecting to the websocket for receiving messages
- ALL_PROXY to provide one server for both

More details on our proxy handling:

- https://github.com/Rob--W/proxy-from-env#environment-variables
- https://github.com/TooTallNate/node-proxy-agent

This is the natural way of things for Linux. My understanding is that
most proxies on MacOS are system-wide and transparent, so it's not so
urgent. But Windows will likely require further UI for configuration.
Will need to do some testing with Windows users.
2017-12-04 15:35:50 -08:00
Scott Nonnenberg
79c4893b5f
aptly.sh: support for current and previous ubuntu versions (#1856)
artful and xenial. Sadly, this appears to double the upload time for a
new build. :0(
2017-12-04 15:35:06 -08:00
Scott Nonnenberg
2fdb048721
NullMessage sent before verification sync should not be silent (#1857) 2017-12-04 15:28:38 -08:00
Scott Nonnenberg
2430ee00d4
Emoji: Eliminate unused images, make sure panel clicks add emoji (#1849)
* Emoji: Ensure that all clicks work by using emoji data directly

* Eliminate a number of unused emoji images from final build

* Re-add the generic sheets directory, which we partially filter
2017-12-04 10:19:35 -08:00
Scott Nonnenberg
c195ba2630
Save prekeys optimistically, track confirms, new clean behavior (#1846)
* Re-enable libtextsecure unit tests, get passing, run in CI

* Save prekeys optimistically, track confirmed, new clean behavior

* Eliminate potential conflicts when rotating on startup

* Remove last symlink: get libtextsecure tests running on windows
2017-12-01 13:35:39 -08:00
Scott Nonnenberg
21325bc922
Move sync messages to silent = true (#1843)
* Set silent = true for all sync messages

* sendmessage.js: Remove brace-less if
2017-12-01 13:31:48 -08:00
Scott Nonnenberg
6cb8b99637
Harden our handling of config.json, verify that window is visible (#1830)
* Validate config-provided locatio against available screens

* Increase buffer around screen from 10px to 100px

* Protect against null mainWindow, fix height/width typo

* Properly handle missing x and y

* Move to _.isNumber for checking x and y

* Use greater than or less than to allow for y = 0, exactly 100px
2017-11-30 11:58:00 -08:00
Scott Nonnenberg
d9a48478ec
Logging for prekey fetches, load of log files (#1836)
* Log the files discovered in logPath

I've encountered some logs which include very old entries; and my
suspicion is that we're not cleaning up old log files properly.

* Log prekey fetches (success and failure), just like signed keys

* Force log file information into the final web-ready log
2017-11-30 11:56:46 -08:00