GithubHelp home page GithubHelp logo

mozilla / betachannel Goto Github PK

View Code? Open in Web Editor NEW
3.0 8.0 5.0 6.55 MB

DEPRECATED - Give beta testers access to your Apps

Home Page: https://wiki.mozilla.org/Mobile/Projects/BetaFox

Shell 4.63% JavaScript 79.63% Python 6.38% CSS 9.36%
abandoned unmaintained

betachannel's Introduction

BetaFox

Give beta testers access to your Apps

This is the source code to the BetaFox webapp.

FirefoxOS, Firefox for Android and other future runtimes let developers write Open Web Apps. Distributing privileged apps to remote testers is very difficult.

This webapp allows developers to upload their packaged apps and gives them versioned install links. Beta testers can install the app from the link.

Dependencies

  • NodeJS 10.x or greater
  • Python 2.7 or greater, but less than Python 3.x
  • MySQL
  • NSS Tools
  • zip/unzip (UnZip, by Info-ZIP will work)

See docs/AWS.md for a fast, simple Ubuntu/EC2 based install.

Developer Installation

$ cp server/config/default.js  server/config/developer.js
# customize developer.js config file as you see fit... then
$ mysql < docs/db/schema_up_000.sql
$ npm install
$ npm start

npm install isn't required for stage and production servers. The node modules required are checked in with the source code. npm rebuild is required for all environments.

The webapp is available at http://localhost:8000

Development

Client side assets are prepared and built with GruntJS.

grunt

Minified or built assets are commited into git.

Get Involved

https://wiki.mozilla.org/Mobile/Projects/BetaFox

betachannel's People

Contributors

muffinresearch avatar oremj avatar ozten avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

betachannel's Issues

Delete versions after N months

We should garbage collect and delete versions after N months.

Versions should be "achievable", which would protect them from garbage collection.

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Packaged apps launch to '/' instead of /index.html or whatever

Launching installed packaged apps result in a directory listing of files. Usually, clicking index.html will launch the app.

Examples:
Calculator http://d2gk.co/app/v/13/install/shout%40ozten.com%2CCalculator
HERE Maps http://d2gk.co/app/v/14/install/shout%40ozten.com%2CHERE%20Maps

Age of Barbarians http://d2gk.co/app/v/15/install/shout%40ozten.com%2CAge%20of%20Barbarians

Firetext http://d2gk.co/app/v/16/install/shout%40ozten.com%2CFiretext

Log in JSON format

We should use something like winston or bunyan for JSON logging, so we can parse and ship the logs with heka.

Create public directory and do most of phonetools work server side

Currently the d2g phonetools code does a lot on the provisioning, client side.

It's possible we could move this work server side and remove the nss3-tools dependency.

Let's try to:

  1. Create a public directory, next to the existing trusted directory
  2. Do configure-2-distribute-2-gecko.sh work after doing the current generate_cert.sh work

everything except push_certdb.sh and change_trusted_servers.sh which still should happen client side during provisioning.

  1. Expose cert9.db, key4.db, and pkcs11.txt directly under the static files directory www.

Integrate with recroom

We should make it easy to put your packaged app on recroom.

recroom distribute-beta

https://github.com/mozilla/recroom

For a very basic 1.0, recroom could just send the user to the homepage, which will redirect to their dashboard if they are already authenticated.

For a better experience, we can build hawk or OAuth authentication into recroom's CLI and BetaFox's REST API. recroom would make sure the user was authenticated, then do the upload for them, then launch their app install page.

via @rorito @tofumatt

Directly serve up public cert files

Currently we write symlinks into www. This isn't a good idea operationally.

We should remove these symlinks and serve up the files directly from local certs directory.

Support for teams

Currently, a team could share a persona login to share code. Or links are obfuscated but password protected? I'd like to be able to password protect builds or add a list of emails of those allowed to access it. Preferably the latter.

manifest origin causes failed install

I/Gecko   (  295): *************************
I/Gecko   (  295): A coding exception was thrown and uncaught in a Task.
I/Gecko   (  295):
I/Gecko   (  295): Full message: TypeError: undefined has no properties
I/Gecko   (  295): Full stack: this.DOMApplicationRegistry.startDownload<@resource://gre/modules/Webapps.jsm:1378:1
I/Gecko   (  295): TaskImpl_run@resource://gre/modules/Task.jsm:282:1
I/Gecko   (  295): resolve@resource://gre/modules/commonjs/sdk/core/promise.js:118:11
I/Gecko   (  295): then@resource://gre/modules/commonjs/sdk/core/promise.js:43:43
I/Gecko   (  295): resolve@resource://gre/modules/commonjs/sdk/core/promise.js:185:11
I/Gecko   (  295): reject@resource://gre/modules/commonjs/sdk/core/promise.js:133:24
I/Gecko   (  295): then@resource://gre/modules/commonjs/sdk/core/promise.js:52:51
I/Gecko   (  295): resolve@resource://gre/modules/commonjs/sdk/core/promise.js:185:11
I/Gecko   (  295): reject@resource://gre/modules/commonjs/sdk/core/promise.js:208:7
I/Gecko   (  295): TaskImpl_handleException@resource://gre/modules/Task.jsm:366:5
I/Gecko   (  295): TaskImpl_run@resource://gre/modules/Task.jsm:294:9
I/Gecko   (  295): Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:710:9
I/Gecko   (  295): this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:586:7
I/Gecko   (  295):
I/Gecko   (  295): *************************

reprovision marketplace certs

Since builds aren't the most accessible, I would like to be able to restore my phone's functionality back to (or even in addition to) marketplace after modifying my certs.

Add Other Installed Apps section to Install page

We should make a list of links to other apps you have installed and populate the app_install page. This allows a user to easily navigate to the latest version of the apps which they have installed on this device.

This does not allow you to discover apps which you do not already know about.

Some apps won't download

After installing http://d2gk.co/app/v/8/install/[email protected],Calculator
Download fails:

E/GeckoConsole(  110): [JavaScript Error: "Permission denied for <app://system.gaiamobile.org> to create wrapper for object of class UnnamedClass" {file: "app://system.gaiamobile.org/js/app_install_manager.js" line: 390}]
I/Gecko   (  110): Event handler expection [Exception... "[JavaScript Error: "Permission denied for <app://system.gaiamobile.org> to create wrapper for object of class UnnamedClass" {file: "app://system.gaiamobile.org/js/app_install_manager.js" line: 390}]'[JavaScript Error: "Permission denied for <app://system.gaiamobile.org> to create wrapper for object of class UnnamedClass" {file: "app://system.gaiamobile.org/js/app_install_manager.js" line: 390}]' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: yes]

Create health check

We need a health check. This should probably check S3, DynamoDB, MySQL, etc.

Figure out how to revert provisioning

After a devices is provisioned to trust BetaFox, it is no longer usable as a general device. It doesn't trust the Marketplace, for example.

We should have an option to revert the test provisioning.

UX Issues

What is browse versus upload?
on change event for file picker, start upload

Uploaded, now what?

Install versus "download zip"

QR code broke on

INSTALL_FROM_DENIED should show help.

Big install button!!!!

Provide revocation script

Should delete all public and private certificates.

Open question:
What do we do about existing apps?

  1. delete them all
  2. leave them, notice when they were signed by revoked keys and don't allow install?

Write certdb files somewhere outside of www

We should write viewable cert.db files outside of the package root i.e., make it configurable.

Error: EACCES, permission denied '/opt/betafox/betafox/www/cert9.db'
    at Object.fs.symlinkSync (fs.js:730:18)
    at /opt/betafox/betafox/server/lib/keygen.js:53:16
    at Array.forEach (native)
    at /opt/betafox/betafox/server/lib/keygen.js:48:49
    at ChildProcess.exithandler (child_process.js:645:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.